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
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
www.nxjournaling.com
RE: Journal to remove phantom objects in layers
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
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 Modulewww.nxjournaling.com
RE: Journal to remove phantom objects in layers
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
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
www.nxjournaling.com