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!

Size attribute in block... 1

Status
Not open for further replies.

hexfly

Automotive
Dec 27, 2009
71
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.
 
Replies continue below

Recommended for you

Attached is an NX 5.0 Part file with a Part Attribute named 'DESCRIPTION' which contains the X,Y,Z lengths of a 'Block' (note that I also threw in an Attribute which reflects the MASS of the 'Steel' Block). Just look at the Expression dialog and you will see how the 'Attribute Expressions' were formatted.

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.
 
Thanks John. I am playing around with this in NX6. I am trying to get this attribute value (DESCRIPTION) to show up in the column "Description" and that column is still blank. Is there any way to get the x,y & z values to show up in the description column for exporting to a spreadsheet for ordering block sizes?

Thanks again!
 
Attached is a Drawing of the same 'Block_with_Attribute' part and I had no problems getting the Description Attribute to be included in the Parts List.

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.
 
Thanks John. I'm sorry, but I think I misled you on what I am looking for. What I would (ideally) like would to have the size description show up in the model tree (assembly navigator) under the column titled "File Description".
I am starting to think that this may not be possible.

I can get the description to show up in the partslist...



Thanks again.
 
Not a problem. Just open the Assembly Navigator, place your cursor over some 'white space', press MB3 and select the...

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

To an Engineer, the glass is twice as big as it needs to be.
 
Sweet! Thanks so much John. This just solved a lot of problems for me!
 
John, I am trying to get the same result with an inch file, 3 place decimal, and can't get the 3plc decimal to show up in the assembly navigator when I add the "DESCRIPTION" COLUMN. It is only showing the first number like "1" instead of 1.125

Is there a way to have 3 plc decimals show up in english?

Thanks again.
Adam
 
OK, in the Expression where you find the following string...

...("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

To an Engineer, the glass is twice as big as it needs to be.
 
Got it. Thanks! Do you know if i can get a quantity to show up in the navigator? There is a quantity column, but it just shows 1 for everything?

Thanks for all your help!
 
The 'Quantity' column is the number of Components, and while single Components obviously only shows a '1', if it's an Assembly or Sub-Assembly, the column will show the number of components which makes up that particular Assembly/Sub-Assembly.

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.
 
John,
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...
 
Attached is an example of a part where I've created a 'Length' Measurement of the edges of this model (double click on the Measurement feature to see the edges being measured). Granted, this would not be the flattened length but it could be computed using a neural axis calculation, or I could have created this as a sheet metal model and then I could have measured a flattened solid which would be accurate.

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.
 
Just wondering why using the approach above (...("DESCRIPTION",format("Block: %0.0fmm X ",p18)+format(...)
does not update when using interpart expressions? :-(
 
Ok. Not trying to beat a dead horse here. I have been using this expression in all my designing and it works great for me. However, it would be even better if the "description" showed the size attributes in order, regardless of xyz values.

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
 
You mean you want to 'sort' the order, smallest-to-largest, irrespective of whether the values represent 'Length (X)', 'Width(Y)' or 'Height(Z)', correct?

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

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

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
 
Not sure exactly what it is that you're attempting to do nor what is controlled (triggered) by what. Could you be a little more detailed in your description of what you're looking for?

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