×
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 remove phantom objects in layers

Journal to remove phantom objects in layers

Journal to remove phantom objects in layers

(OP)
When doing modelling few layers contain more object counts than the existing entities in that layer.
For example Layer 255 has object count 7. I tried part cleanup to remove unused expressions and checked the layer by blanking and unblanking (ctrl+shift+B) (ctrl+shift+U) then also no objects could be seen in layer 255.
I tried switching off the timestamp and checked the layers in part navigator,I could not find any entities in layer 255.
Can anyone tell how to remove these phantom objects in layers.
Also I want to create a journel to automate this process in different parts.
Can anyone guide me.?

Thanks in advance

RE: Journal to remove phantom objects in layers

Try the "delete unused objects" option in the part cleanup and see if it affects your object count.

www.nxjournaling.com

RE: Journal to remove phantom objects in layers

(OP)
@cowski
I have followed your previous posts and have tried all.
I haved tried deleting unused objects.
No result. object count remains same

RE: Journal to remove phantom objects in layers

It is helpful to know what type of objects you are dealing with. The code below will report all the objects that are currently on layer 255.

CODE

Option Strict Off
Imports System
Imports NXOpen

Module Module1

    Sub Main()

        Dim theSession As Session = Session.GetSession()
        If IsNothing(theSession.Parts.Work) Then
            'active part required
            Return
        End If

        Dim workPart As Part = theSession.Parts.Work
        Dim lw As ListingWindow = theSession.ListingWindow
        lw.Open()

        Const undoMarkName As String = "layer inspect"
        Dim markId1 As Session.UndoMarkId
        markId1 = theSession.SetUndoMark(Session.MarkVisibility.Invisible, undoMarkName)

        Const layerNum As Integer = 255

        Try
            For Each temp As NXObject In workPart.Layers.GetAllObjectsOnLayer(layerNum)
                lw.WriteLine("tag: " & temp.Tag.ToString)
                lw.WriteLine("type: " & temp.GetType.ToString)
                lw.WriteLine("")
            Next

        Catch ex As NXException
            theSession.UndoToMark(markId1, undoMarkName)
            MsgBox(ex.Message)

        Finally

        End Try

        lw.Close()

    End Sub

End Module 

www.nxjournaling.com

RE: Journal to remove phantom objects in layers

Before you start deleting things you don't know anything about :
If you press Ctrl+L you will open the Layer settings dialog. Scroll down this dialog, expand the "Layer control" section and you will find a "Information" button.
press this and you will get information on what kind of objects you have on layer 255. NX will display something like "1 Point 2 Arc 2 Component 2 Assembly constraint etc etc". It might still be objects that you want to keep, Assembly constraints is one example.

Have you imported any data such as DXF/DWG into this model ? It is very common that these files contain View dependent Objects.
A View dependent object is an object which is ONLY visible in a single View. In NX an Invisible object CANNOT be deleted .( unless you run a program to do this.) A typical example of a view dependent object is a text note or a dimension.
If you have Imported DXF/DWG data, the import normally also creates one or more new views, in which these objects are visible . RMB in the graphics, Replace View - Custom Views...( NOT Orient View!) The dialog will contain the imported views, make sure the "Fit" option is ON, then try each of the views in the list.

Another case is if there is a drawing in the Part, any notes, dimensions, symbols etc on this are also view dependent but on the drawing.
- A drawing will be visible in the part navigator.

Regards,
Tomas

RE: Journal to remove phantom objects in layers

(OP)
@cowski,
It was very helpful. I was able to identify the objects in the layer 255.
It shows Nxopen.line,Nxopen.annotations,NXOpen.DisplayableObject

I want to delete annotations and dispalyable objects ,but I have no clue.



@Toost,
I checked the info on layer ,It has
5 Line 2 Drafting Entity

But how to delete these?
Anyhow I have not created or imported DWG files into the part.

Thanks much

RE: Journal to remove phantom objects in layers

Switch to the drafting application to see if there are any drawing sheets. If any drawing sheets exist, check to see if there are dimensions or line objects on the sheet.

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