Controling Layers / bodys
Controling Layers / bodys
(OP)
Hello i wonder if anyone could help me or point some directions...
i have this code:
credits: petulf
and i would like to exclude the bodys on layers 50,90,250-255
could anyone point me something ? itryed to record a jounral hiding the layers then adding it to the code but no result :(
NX8.5 - NX9 - NX 10 - NX11
i have this code:
CODE
For Each bodyItem As Body In CType(child.Prototype, Part).Bodies
Dim tmpNXObject As NXObject = child.FindOccurrence(bodyItem)
If Not tmpNXObject Is Nothing Then
componentTagList.Add(CType(tmpNXObject, Body).Tag)
End If
Next and i would like to exclude the bodys on layers 50,90,250-255
could anyone point me something ? itryed to record a jounral hiding the layers then adding it to the code but no result :(
NX8.5 - NX9 - NX 10 - NX11





RE: Controling Layers / bodys
www.nxjournaling.com
RE: Controling Layers / bodys
CODE --> VB
Dim exclusionLayers As New System.Collections.Generic.List(Of Integer)({50, 90, 250, 251, 252, 253, 254, 255}) For Each bodyItem As Body In CType(child.Prototype, Part).Bodies Dim tmpNXObject As NXObject = child.FindOccurrence(bodyItem) If Not tmpNXObject Is Nothing Then If Not exclusionLayers.Contains(bodyItem.Layer) Then componentTagList.Add(CType(tmpNXObject, Body).Tag) End If End If NextRE: Controling Layers / bodys
i think it worked i will do some more tests if i ecounter problems i will reach u :)
NX8.5 - NX9 - NX 10 - NX11
RE: Controling Layers / bodys
in some prts its not doing what its suposed to but i think its because he dont find the linked body prt example:
i have
TOP_PRT
-PRT1 (CONTENTS: SOLID BODY + LINKED garbadge_subprt SOLID BODY)
--garbadge_subprt(CONTENTS: SOLID BODY )
-PRT2 (CONTENTS: SOLID BODY + LINKED garbadge_subprt SOLID BODY)
--garbadge_subprt(CONTENTS: SOLID BODY )
when the code runs if im missing the garbadge_subprt its returning NXopen error. i will explore it and say something :)
NX8.5 - NX9 - NX 10 - NX11
RE: Controling Layers / bodys
CODE
anyone knows if its possible or could point me something to export a parasolid with another WCS from another file?
example:
TOP_PRT
-PRT1 (CONTENTS: SOLID BODY + LINKED garbadge_subprt SOLID BODY)
--garbadge_subprt(CONTENTS: SOLID BODY )
-PRT2 (CONTENTS: SOLID BODY + LINKED garbadge_subprt SOLID BODY)
--garbadge_subprt(CONTENTS: SOLID BODY )
when i export it will export PRT1/prt2/garbage (separately) with WCS from TOP_PRT
NX8.5 - NX9 - NX 10 - NX11
RE: Controling Layers / bodys
NX8.5 - NX9 - NX 10 - NX11