Hi, I want to select the extracted faces of a part to change the display and also to change on which layer they are on. The problem is the selection of the extracted face.
When recording the journal, it gives the following:
Dim objects1(0) As NXOpen.DisplayableObject
Dim body1 As NXOpen.Body = CType(workPart.Bodies.FindObject("EXTRACT_FACE(53)"), NXOpen.Body)
objects1(0) = body1
But I need to pass the name of the extracted face to that and additionnally I want to make a loop to find all the extracted face of the part to do the same with all of them.
Can someone tell me what's wrong in it:
' Features to select
Dim feat As Feature
Dim featColl As FeatureCollection = workPart.Features
Dim classType As String = Nothing
Dim featType As String = Nothing
Dim IndexFace As Integer = 0
Dim FaceNameArray() As String
Dim objects1(IndexFace) As NXOpen.DisplayableObject
For Each feat In featColl
featType = feat.FeatureType
classType = feat.GetType().FullName
If featType = "Extracted Face" Then
FaceNameArray(IndexFace) = feat.GetFeatureName()
Dim body1 As NXOpen.Body = CType(workPart.Bodies.FindObject(FaceNameArray(IndexFace)), NXOpen.Body)
objects1(IndexFace) = body1
IndexFace = IndexFace + 1
It looks like FaceNameArray(IndexFace) return a Null value so I do not build anny array with it.
In a more general way, is there a way to find all the attributes of NX classes and all properties that apply to them; it is very tedious work to "guess" how NX developpers did work while programing that. Also, is there a way to run journal in a break mode and have some break points and spy on the intermediate results to debug those programs?