Dim theSession As Session = Session.GetSession()
If IsNothing(theSession.Parts.Work) Then
'active part required
Return
End If
Dim workPart As Part = theSession.Parts.Work
Dim lw As ListingWindow = theSession.ListingWindow
lw.Open()
For Each myFeature As Features.Feature In workPart.Features
If TypeOf (myFeature) Is Features.PointSet Then
lw.WriteLine(".GetFeatureName: " & myFeature.GetFeatureName)
lw.WriteLine(".Name: " & myFeature.Name)
lw.WriteLine(".FeatureType: " & myFeature.FeatureType)
lw.WriteLine(".Timestamp: " & myFeature.Timestamp.ToString)
lw.WriteLine("")
Dim myPoints() As NXObject = myFeature.GetEntities
For Each tempPt As Point In myPoints
lw.WriteLine(tempPt.Coordinates.ToString)
Next
End If
Next
lw.Close()
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image immediately after execution within NX
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately