jmarkus
Mechanical
- Jul 11, 2001
- 377
How do I determine the MATERIAL attribute assigned to a solid body using .NET Journal?
Thanks,
Jeff
Thanks,
Jeff
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Dim theSession As Session = Session.GetSession()
Sub Echo(ByVal output As String)
theSession.ListingWindow.Open()
theSession.ListingWindow.WriteLine(output)
theSession.LogFile.WriteLine(output)
End Sub
Sub ReportNXObjectAttributes(ByVal obj As NXObject)
Dim mv As String = "unset"
mv = obj.GetStringAttribute("MATERIAL")
Echo ("Material = " + mv)
End Sub
Sub Main()
Dim theSelection As Selection = UI.GetUI().SelectionManager
For ii As Integer = 0 To theSelection.GetNumSelectedObjects() - 1
ReportNXObjectAttributes(theSelection.GetSelectedTaggedObject(ii))
Next
End Sub
End Module