Journal - NX9 - Part Attributes and Dimensionality (Units)
Journal - NX9 - Part Attributes and Dimensionality (Units)
(OP)
Hi,
I've got a journal that will create a part attribute using:
where att is the ATtribuite Title, and 999.0 is just a placeholder to ensure I create a number-type attribute (e.g. not a string).
When I do this, I get a dimensionless/unitless attribute in the part properties, but ultimately I would like to be able to create mass, volume and area attributes with the correct dimensions via the journal.
Is there a simple way to do this with SetUserAttribute (or something similar), or do I have to use the AttributePropertiesBuilder method and go through all that?
Thanks,
Jeff
I've got a journal that will create a part attribute using:
CODE
workPart.SetUserAttribute(att, -1, 999.0, Update.Option.Now)
where att is the ATtribuite Title, and 999.0 is just a placeholder to ensure I create a number-type attribute (e.g. not a string).
When I do this, I get a dimensionless/unitless attribute in the part properties, but ultimately I would like to be able to create mass, volume and area attributes with the correct dimensions via the journal.
Is there a simple way to do this with SetUserAttribute (or something similar), or do I have to use the AttributePropertiesBuilder method and go through all that?
Thanks,
Jeff





RE: Journal - NX9 - Part Attributes and Dimensionality (Units)
If the above does not work, you'll probably need to use the attribute builder method.
www.nxjournaling.com
RE: Journal - NX9 - Part Attributes and Dimensionality (Units)
I tried assigning the units to the the property Unit.Name for AttributeInformation but it looks like it is read only - or am I doing it wrong again?
CODE
Jeff
RE: Journal - NX9 - Part Attributes and Dimensionality (Units)
CODE
Dim attributeInfo As NXObject.AttributeInformation = Nothing attributeInfo.Title = "TEST" attributeInfo.Type = NXObject.AttributeType.Real attributeInfo.RealValue = 2.718 attributeInfo.Unit = theSession.Parts.Work.UnitCollection.FindObject("SquareMilliMeter") workPart.SetUserAttribute(attributeInfo, Update.Option.Now)www.nxjournaling.com
RE: Journal - NX9 - Part Attributes and Dimensionality (Units)
Once again, I am stumped by the many ways that one can assign properties and values to NX 'things', but you have set me straight!
Jeff