×
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

Object Count of Layer

Object Count of Layer

Object Count of Layer

(OP)
I am confused, could someone please help? I have a component(X2) that contains surfaces on different layers. That component contains another component(X10) that was used for reference only. When I go to my "Layer Setting" the "Object Count" for layer 7 is including items from X10 where as layer 6 does not. Layer count should be 1 for both layer 6 and 7 but it is showing 6 at 1 and 7 at 2. This is with X10 closed. I thought there where objects in X2 that I just couldn't find or display so I used the program below to clear layer 7 but it deleted X10 from tree.
Can anybody explain this for me?

Thanks,
Kevin
NX8.0


Option Strict Off
Imports System
Imports NXOpen
Imports NXOpenUI



Module delete_all_on_layer
Sub Main()

Dim theSession As Session = Session.GetSession()
Dim workPart As Part = theSession.Parts.Work
Dim layerObjects() As NXObject
Dim UserInputNumber As Double
UserInputNumber = NXInputBox.GetInputNumber("Enter Layer You Wish To Clear", "Layer", 0)

'clearing layer "X" of all entities-------------------------------------------------------------
layerObjects = workPart.Layers.GetAllObjectsOnLayer(UserInputNumber)
If layerObjects.Length > 0 Then
Dim count As Integer = theSession.UpdateManager.AddToDeleteList(layerObjects)
Dim undoMark As Session.UndoMarkId = theSession.SetUndoMark(Session.MarkVisibility.Visible, "Undo Mark")
theSession.UpdateManager.DoUpdate(undoMark)
End If

End Sub
End Module

RE: Object Count of Layer

Are you talking about 'Components' of an Assmebly? And if so, I assume that you're looking at the Layer list for the Assembly file, correct?

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Object Count of Layer

(OP)
John,

Yes, X2 is a temporary assembly and yes, the layer list for the assembly. Once all needed geometry is created in X2, X10 will be deleted from X2 because it will no longer be needed for reference.

RE: Object Count of Layer

One thing to keep in mind, when adding Components to an Assembly, there's a 'Layer Option' in the 'Settings' section of the 'Add Component' dialog. Make sure you've selected the 'Option' that gives you what you expect.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.

RE: Object Count of Layer

(OP)
Thanks John, we have looked into this and found that changing the "Layer Option" has undesired effects. I am currently trying to change the selection scope of the program to ignore sub-components.

Kevin

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