lklo
Industrial
- Nov 24, 2010
- 226
Hi -
I am trying to extract the "unit" from a NX Part attribute.
It seems like regarding the documentation - it should be possible to ask for the Unit - but I am not sure how to - and to extract the unit as a string...
code start:
theSession.ListingWindow.Open()
For Each a_part As Part In theSession.Parts
theSession.ListingWindow.WriteLine(a_part.Leaf & " attributes:")
For Each attr_info As NXObject.AttributeInformation In
a_part.GetAttributeTitlesByType(NXObject.AttributeType.Any)
theSession.ListingWindow.WriteLine(attr_info.Title & " = " & a_part.GetStringAttribute(attr_info.Title))
'theSession.ListingWindow.WriteLine(a_part.GetStringAttribute(attr_info.unit) ' seems not to work
Next
theSession.ListingWindow.WriteLine("")
Next
code end:
Maybe one of you have a suggest or a solution - or just a hint - which can guide me in the direction of success..
Lklo
I am trying to extract the "unit" from a NX Part attribute.
It seems like regarding the documentation - it should be possible to ask for the Unit - but I am not sure how to - and to extract the unit as a string...
code start:
theSession.ListingWindow.Open()
For Each a_part As Part In theSession.Parts
theSession.ListingWindow.WriteLine(a_part.Leaf & " attributes:")
For Each attr_info As NXObject.AttributeInformation In
a_part.GetAttributeTitlesByType(NXObject.AttributeType.Any)
theSession.ListingWindow.WriteLine(attr_info.Title & " = " & a_part.GetStringAttribute(attr_info.Title))
'theSession.ListingWindow.WriteLine(a_part.GetStringAttribute(attr_info.unit) ' seems not to work
Next
theSession.ListingWindow.WriteLine("")
Next
code end:
Maybe one of you have a suggest or a solution - or just a hint - which can guide me in the direction of success..
Lklo