×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Journal to Delete Basic Curves

Journal to Delete Basic Curves

Journal to Delete Basic Curves

(OP)
I have a journal where the user selects curves to be deleted. My problem is that I have been unable to determine if a selected curve has dependents so that it can be removed from the list of curves to be deleted. Any help would be greatly appreciated.

Thanks,
Kevin

RE: Journal to Delete Basic Curves

If you're trying to delete all unused entities in a file there's:

File-->Utilities-->Part Cleanup has a "Delete Unused Objects"

Or is the object to just delete certain unused curves?

RE: Journal to Delete Basic Curves

(OP)
Needs to certain unused curves, some unused curves are kept for referencing previous changes.

RE: Journal to Delete Basic Curves

This is a situation that I've also recently encountered. A function that may help you is highlighted below.

CODE

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF

Module Module1

    Sub Main()

        Dim theSession As Session = Session.GetSession()
        Dim theUfSession As UFSession = UFSession.GetUFSession()
        Dim workPart As Part = theSession.Parts.Work

        Dim featTag As Tag = Tag.Null

        For Each myCurve As Curve In workPart.Curves
            theUfSession.Modl.AskObjectFeat(myCurve.Tag, featTag)
            If featTag = Tag.Null Then
                'curve is unused
                myCurve.Highlight
            End If
        Next

    End Sub


End Module 

www.nxjournaling.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources