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!

Formatting a parts List

Status
Not open for further replies.

munners

Marine/Ocean
Jul 11, 2009
33
Hi guys

I'm using NX6 and have a parts list on a drawing. The parts list has a column called length which displays the correct size of the item in mm but does it to 2 decimal places when I just need it to the nearest mm. I have tried formatting the cells/column using RIGHT CLICK -> STYLE -> CELLS TAB -> DECIMAL PLACES and entering 0 but it does nothing. Also tried entering 5 decimal places but it just stays displayed to 2 decimal places.
Also I have another column to show the mass. It displays the mass in grams and can't figure out how to change it to kg. Any advice?

Thanks

Munners
 
Replies continue below

Recommended for you

I don't know what suggest as for the decimal place setting of the Length column, but for the Mass column, just select the column, press MB3, select 'Style' and go to the 'Cells' tab. Near the middle of the dialog toggle ON the 'Evaluate Call as Formula' option. Now go back to the 'Columns' tab and edit the 'Default Text' entry to read <W$=@$MASS>/1000 and hit Apply. This will convert the 'Grams' to 'Kilograms'. Now go back to the 'Cells' tab and adjust the number of decimal places if needed.

But getting back to the 'Length" column, check the 'Style' of this column looking at the 'Default Text' entry on the 'Columns' tab. Does it read <W$=@$LENGTH> or <W$=@LENGTH> (without the second '$')? If it looks like the second example, then this is not a numerical value, but rather an Attribute and as such, its decimal place cannot be controlled by the Parts List dialog options. You will have to manage the decimal place back in the part model where the Attribute was defined. If it turns out to be an Attribute linked to an Expression value, let me know and I'll provide you a scheme to define the number of decimal places at the 'source' as it were.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Hi John

Thanks for the grams to kg tip - sorted now. As for the length measurement, you are right it is an attribute created as per (your advice again!) please let me know how to define the number of decimal places.

Thanks

Munners
 
You've already got all that you need...

If you go back to that example I posted, look at the value of the Expression 'LENGTH_Attribute':

ug_setPartAttrValue("LENGTH",format("%0.2f mm",Arc_Length))

The value of the number in the "%0.2f mm" segment of the formula sets the number of decimal places (if you wish just an integer use a zero ('0') as in "%0.0f mm". Also note that the "mm" is just optional text which is appended to the 'numerical' portion of the text string which this routine returns.

John R. Baker, P.E.
Product 'Evangelist'
Product Design Solutions
Siemens PLM Software Inc.
Industry Sector
Cypress, CA

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