EngProgrammer
Aerospace
I am using the subject function to extract the edges from a face of a solid body. Here's the snippet of code:
It works great; however, it is returning the tag of the line. Next I want to take that line and put it on a specific layer.
so, I developed this code from journaling:
I need to convert the tag of the line into an nxobject. How do I do that?
Code:
For Each thisEdge As Edge In largestFace.GetEdges
Dim newCurve As NXOpen.Tag = NXOpen.Tag.Null
theUFsession.Modl.CreateCurveFromEdge(thisEdge.Tag, newCurve)
Next
It works great; however, it is returning the tag of the line. Next I want to take that line and put it on a specific layer.
so, I developed this code from journaling:
Code:
Private Sub MoveToLayer(ByVal iLayer As Integer, ByVal obj As NXObject)
Dim displayModification1 As DisplayModification
displayModification1 = theSession.DisplayManager.NewDisplayModification()
displayModification1.ApplyToAllFaces = False
displayModification1.ApplyToOwningParts = False
displayModification1.NewWidth = DisplayableObject.ObjectWidth.Two
displayModification1.NewLayer = iLayer
'Dim objects1(0) As DisplayableObject
'Dim line1 As Line = CType(workPart.Lines.FindObject("ENTITY 3 24 1"), Line)
'objects1(0) = line1
displayModification1.Apply({obj})
displayModification1.Dispose()
End Sub
I need to convert the tag of the line into an nxobject. How do I do that?