Obtain Point Reference Number
Obtain Point Reference Number
(OP)
thread561-276765: Created Leaders using journal
When you use the feature Information->Object-> and you select a point you're able to see the reference name for the point, i.e. Point(1) or Point (2) depending on when it was created. Is there a way to retrieve this property in a Journal.
When you use the feature Information->Object-> and you select a point you're able to see the reference name for the point, i.e. Point(1) or Point (2) depending on when it was created. Is there a way to retrieve this property in a Journal.





RE: Obtain Point Reference Number
Option Strict Off
Imports System
Imports NXOpen
Module pointfeatname
Sub Main()
Dim s As Session = Session.GetSession()
Dim lw As ListingWindow = s.ListingWindow
Dim workPart As Part = s.Parts.Work
Dim pcol As PointCollection = workPart.Points
Dim fcol As Features.FeatureCollection = workPart.Features
Dim feat1 As Features.Feature
Dim featname1 As String = Nothing
If pcol.ToArray().Length = 0 Then
lw.Open()
lw.WriteLine("No Points found. Exit.")
Return
End If
For Each pt As Point In pcol
feat1 = fcol.GetAssociatedFeature(pt)
featname1 = feat1.GetFeatureName.ToString
If featname1.Substring(0, 5) = "Point" Then
MsgBox(featname1)
End If
Next
End Sub
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image immediately after execution within NX
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
End Function
End Module
Regards
Frank Swinkels
RE: Obtain Point Reference Number
-nathangaldamez
RE: Obtain Point Reference Number
How would translate this code to give me Ruled Surfaces instead of Points.
Thanks,
Nathan