Formatting a parts List
Formatting a parts List
(OP)
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
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





RE: Formatting a parts List
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
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Formatting a parts List
Thanks for the grams to kg tip - sorted now. As for the length measurement, you are right it is an attribute created as per http://www.eng-tips.com/viewthread.cfm?qid=264266 (your advice again!) please let me know how to define the number of decimal places.
Thanks
Munners
RE: Formatting a parts List
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
http://www.siemens.com/plm
http://www.plmworld.org/museum/
To an Engineer, the glass is twice as big as it needs to be.
RE: Formatting a parts List