Displaying a componets expression value in parts list NX7.5
Displaying a componets expression value in parts list NX7.5
(OP)
Is this possible?
I started a library of springs and have (1) model for each type. If this is doable it would conveniently show me the diameter and free length of each spring type in the BOM later. These variables are often changed till a design is settled up. The PN# is then added at the end.
TIA
Dave
I started a library of springs and have (1) model for each type. If this is doable it would conveniently show me the diameter and free length of each spring type in the BOM later. These variables are often changed till a design is settled up. The PN# is then added at the end.
TIA
Dave





RE: Displaying a componets expression value in parts list NX7.5
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: Displaying a componets expression value in parts list NX7.5
1 dia. X 3 lg. (Desired appearance)
Expressions are...
DIA
FREE_LENGTH
RE: Displaying a componets expression value in parts list NX7.5
File -> Properties -> Attributes
...and create an Attribute titled 'DESCRIPTION' (just leave the value blank).
Now go to...
Tools -> Expression...
...and create an expression with some name like 'Description_Attribute' (despite what you may think this expression needs to be of Type 'Number', but the units are meaningless so don't worry about that as anything will work) with the valuA set to:
ug_setPartAttrValue("DESCRIPTION",format("%0.2f dia X ",DIA)+format("%0.2f lg",FREE_LENGTH))
Now this will cause the value of the DESCRIPTION Attribute to be set to ' 1.00 dia X 3.00 lg '. Now if the DIA and FREE_LENGTH values are always integers, you can change the ' %0.2f ' to ' %0.0f ' in both places in the above expression.
OK, now that you have your proper attribute defined you can include it like any other Attribute in the Assembly's Parts List.
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: Displaying a componets expression value in parts list NX7.5
Now that i have it... I see that I need to manually update the attribute contents after any modification the the expression values. It looks like a quick open and apply does the trick.
Any better methods? I was hoping the link would always be "live" and need no imput to keep it updated.
THANKS
Dave
RE: Displaying a componets expression value in parts list NX7.5
Tools -> Update -> Update for External Change
...as this will force a complete update of everything (I've even added an icon to one of my toolbars which executes this function just because of this situation).
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: Displaying a componets expression value in parts list NX7.5
Thanks again... button already added.
Dave
RE: Displaying a componets expression value in parts list NX7.5
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: Displaying a componets expression value in parts list NX7.5
Now... much of the reporting is used as part of a suppier catalog number. Some of these numbers are prefixed with letters.
EX: "DNR -"
I need this to be reported to the same attribute feild with the dimensions.
Here's a expression string I'm using...
ug_setPartAttrValue("BOM_6_CAT_NO",format("D%0.0f, ",DIA)+format("L%0.0f, ",LENGTH)+format("P%0.2f, ",HEIGHT_P)+format("W%0.2f, ",HEIGHT_W)+format("W/FLAT - %0.0fD X ",FLAT_DEPTH)+format("%0.0fL",FLAT_LENGTH)+format("@ %0.0f deg.",FLAT_ANGULAR_POSITION))
Grass Hoppa need help from Masta :)
Dave
RE: Displaying a componets expression value in parts list NX7.5
ug_setPartAttrValue("BOM_6_CAT_NO",format("D DNR-%0.0f, ",DIA)+format("L DNR-%0.0f, ",LENGTH)+format("P%0.2f, ",HEIGHT_P)+format("W%0.2f, ",HEIGHT_W)+format("W/FLAT - %0.0fD X ",FLAT_DEPTH)+format("%0.0fL",FLAT_LENGTH)+format("@ %0.0f deg.",FLAT_ANGULAR_POSITION))
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.