EngProgrammer
Aerospace
How do I get a handle on the DatumPlane that is in the workpart. I developed this code and having a problem debugging it.
Code:
Function GetDatumPlanes(ByVal in_part As Part) As DatumPlane()
Dim a_DatumPlane As Tag = NXOpen.Tag.Null
Dim type, subtype As Integer
Dim bList As ArrayList = New ArrayList
Do
theUFsession.Obj.CycleObjsInPart(in_part.Tag, _
UFConstants.UF_datum_plane_type, a_DatumPlane)
If Not a_DatumPlane.Equals(NXOpen.Tag.Null) Then
theUFsession.Obj.AskTypeAndSubtype(a_DatumPlane, type, subtype)
If subtype = UFConstants.UF_datum_object_subtype Then
bList.Add(Utilities.NXObjectManager.Get(a_DatumPlane))
End If
End If
Loop While Not a_DatumPlane.Equals(NXOpen.Tag.Null)
Return bList.ToArray(GetType(DatumPlane))
End Function