×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Formatting a parts List

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

RE: Formatting a parts List

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
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

(OP)
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 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

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
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

(OP)
Thanks again John!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources