Size attribute in block...
Size attribute in block...
(OP)
Hi. I am wondering if there is a way to get a block size attribute to automatically update when I change the block parameters.
Basically, I am making a new component and creating a block on layer 1. I am giving the file an attribute called "description" and I want the value to be the block size, and be able to have the value update if I change the block parameters.
Is this possible?
Thanks in advance.
Basically, I am making a new component and creating a block on layer 1. I am giving the file an attribute called "description" and I want the value to be the block size, and be able to have the value update if I change the block parameters.
Is this possible?
Thanks in advance.





RE: Size attribute in block...
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: Size attribute in block...
Thanks again!
RE: Size attribute in block...
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: Size attribute in block...
I am starting to think that this may not be possible.
I can get the description to show up in the partslist...
Thanks again.
RE: Size attribute in block...
Columns -> Configure...
...option. When the dialog comes up, enter the name of the desired Attribute, such as 'DESCRIPTION', in the field at the bottom of the dialog labeled 'Attribute' and hit OK. Now there will be an additional column added to your Assembly Navigator which will contain the 'value' of that Attribute for each Component in your Assembly. Note that you can add as many user-defined Attribute columns as you wish, and once created, they can be toggled ON/OFF like any other column in the Navigator.
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: Size attribute in block...
RE: Size attribute in block...
Is there a way to have 3 plc decimals show up in english?
Thanks again.
Adam
RE: Size attribute in block...
...("DESCRIPTION",format("Block: %0.0fmm X ",p18)+format(...
...wherever you see the string %0.0f, change it to %0.3f (the number after the period defines the number of decimal places shown in the resulting string).
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: Size attribute in block...
Thanks for all your help!
RE: Size attribute in block...
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: Size attribute in block...
pushing the chanlange a little bit further, how would you get the X/Y/Z length of a solid if that solid X direction was continued by a flange?
I'm trying to figure-out how NX can extract the raw material dimensions of a plate not matter if that plate if flat or bent...
RE: Size attribute in block...
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: Size attribute in block...
does not update when using interpart expressions?
RE: Size attribute in block...
Tolls -> Update -> Update for External Change
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: Size attribute in block...
Tools -> Update -> Update for External Change
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: Size attribute in block...
Like 2.00 x 3.25 x 7.00 instead of 3.25 x 7.00 x 2.00
It just makes it easier for the steel vendors.
Is this at all possible John?
Thanks again.
Adam
RE: Size attribute in block...
I'll have to think about that one.
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: Size attribute in block...
I have everything working quit well with this Expression formula, but I have a question, can you do something similar for a "STRING"-type of expression?
I want to eather have "COLDFORGED TUBE" versus "HOTFORGED TUBE" determed by a ug_setPartAttrValue.
Many thanks,
Best regards,
Pascal,
NX5.04+TC2007 (GM Toolkit) / NX7.5 native
RE: Size attribute in block...
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: Size attribute in block...
I have this working to set a Part Attribute "MATERIAL", this can be:
S235JRH | S275JOH/J2H | S355JOH/J2H for "Cold Forged Tube"
or S355NH/J2H for "Warm Forged Tubes"
This is set by these Expressions:
INPUT_MAT =235 or 275 or 355
INPUT_C_W=0 or 1 (Where 0 is for Cold Forged Square Tube and 1 is for Warm Forged Square Tube)
A part of the Expression formula to set Part Attribute "MATERIAL" is:
MATERIAL_Attribute=Ug_setPartAttrValue(if((INPUT_MAT ==235)&&(INPUT_C_W==0))(ug_setPartAttrValue("MATERIAL",format("S%0.fJRH",INPUT_MAT)))else(if((INPUT_MAT ==275)&&( INPUT_C_W ==0))(....)
I would now like have an Expression formula for "DESCRIPTION":
Where if INPUT_C_W==0 then "COLD FORGED SQUARE TUBE" else "WARM FORGED SQUARE TUBE"
Best regards,
Pascal,
NX5.04+TC2007 (GM Toolkit) / NX7.5 native
RE: Size attribute in block...
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: Size attribute in block...
I found the formula myself, I created the Expression as a "String" type because I thought it needed to be of this type because it was only text, that was my failure...
it must be "Numbers" type Expression, like this:
DESCRIPTION_Attribute=if(INPUT_C_W==0)(ug_setPartAttrValue("DESCRIPTION",format("%-10s","COLDFORGED")))else(ug_setPartAttrValue("DESCRIPTION",format("%-10s","WARMFORGED")))
The tip is here to use: format("%-8S","aaa")
Best regards,
Pascal,
NX5.04+TC2007 (GM Toolkit) / NX7.5 native
RE: Size attribute in block...
Formatting strings
format("%8s","aaa") " aaa"
format("%-8s","aaa") "aaa "
Formatting integers
format("%8d",123) " 123"
format("%08d",123) "00000123"
format("%d,123) "123"
format("%d",123.456) "123"
Formatting numbers
format("%8.1f",12.345) " 12.3"
format("%08.1f",12.345) "000012.3"
format("%8.0f",12.345) " 12"
format("%#8.0f",12.345) " 12."
format("%8.1e",334.3434) "3.3e+002"
format("%8.1E",334.3434) "3.3E+002"
Adding spaces and text
format(" %4d",12) " 12"
format(" %4d ",12) " 12 "
format("X=%6.2f",12.1111) "X= 12.11"
format("%5.1f mm",12.1111) " 12.1 mm"
Input Arguments:
str - Specify the string
value - Specify a value
Returns:
String - A formatted number string
Best regards,
Pascal,
NX5.04+TC2007 (GM Toolkit) / NX7.5 native