NX 7.5 Journal - Determine Solid Body Material
NX 7.5 Journal - Determine Solid Body Material
(OP)
How do I determine the MATERIAL attribute assigned to a solid body using .NET Journal?
Thanks,
Jeff
Thanks,
Jeff
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
NX 7.5 Journal - Determine Solid Body Material
|
RE: NX 7.5 Journal - Determine Solid Body Material
Now with NX 7.5 you can still take this approach, just that there will be guarantee that the attribute that read will be correct. Now if you're pretty sure that people have NOT been messing with these Material attribute values, you can go ahead and use this approach now.
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
RE: NX 7.5 Journal - Determine Solid Body Material
Here is one possible .Net implementation of John's suggested approach for NX7.5. It reports the MATERIAL attribute for the selected object(s).
HTH, Joe
CODE
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