Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NX8 MASS Attribute best practices 1

Status
Not open for further replies.

potrero

Mechanical
Aug 30, 2007
516
In past versions, we had developed a practice of using code like this to set a Part Attribute for MASS (which could be used to link to Drafting drawings, etc):

ug_setPartAttrValue("MASS",format("%.3f",MASS))

In the above, one would create a MASS expression which would be set to the Mass value of a parametric Body Measurement feature.

In NX8, the Attributes functionality seems to have gotten a boost, so that now you can set a Part Attribute directly linked to an Expression (ie: MASS from before).

I'm running into an issue, where the value of this expression gets truncated to an integer value when placed into Drafting. (ie: add a Note, set type to "Relationships", Object Parameters, pick MASS from the part...).

In this example, how do I set the number of significant digits for the note when placed onto the Drafting sheet?

And more generally, what is the best practice for MASS Attributes in NX8? Should we stick with the way things worked before, or is there some better way to handle it given improvements in both the Attributes code and Drafting?
 
Replies continue below

Recommended for you

Incidentally, the code in NX8 Drafting which calls the MASS attribute from the Master Model is:

<WRef1*0@MASS>
 
Another follow up:

In Drafting, if one adds a Note linked to an Expression (say, "MASS") in the Drafting file, the code looks like this:

<X0.3@MASS>

Where the "0.3" part indicates the number of significant digits. For example, if the value of the NX Expression is:

MASS = 0.123456789 kg

then the above code would result in a Note on the Sheet as follows:

.123

I can't seem to find anywhere in the Siemens documentation that discusses the syntax of this code, but I would like to modify it so that in this example, the result would have a "0" in front of the decimal, like:

0.123

Anyone know how to accomplish that? (The final result would be something like:

MASS: 0.123 KG

and for masses > 1 kg, it would read something like:

MASS: 1.123 KG

Thanks in advance.
 
Another follow up:

In a previous thread (thread561-299440) John Baker discussed the fact that in a future version (guessing NX8?) Weight Management tools would automatically assign Part Attributes, and that accessing these Attributes would not require special characters, like <W$=@MASS>.

I haven't been able to find a good reference for these updates in the NX8 documentation. I'm also not sure if Advanced Assemblies license is required to even access any of the Weight Management tools (assuming it still is). If so then I need to find a best practice which doesn't depend on Advanced Assemblies.
 
There is nothing in the Documentation, yet. However, if you create a model and save it, then the system should have automatically created a series of Mass Property Attributes, one of which will be the Mass of the part model. If this is not happening, you'll need to make sure that this option has been enabled.

Go to...

Customer Defaults -> Gateway -> Material/Mass -> Attributes

...and check to make sure the various Mass Property Attributes have been toggled ON (they should ON by default).

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
UG/NX Museum:
To an Engineer, the glass is twice as big as it needs to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor