Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attributes to supress drafting object

Status
Not open for further replies.

nmiltner

Bioengineer
Jan 30, 2008
98
Is there a way to use attributes to supress a drafting object? For instance if I have and attribute stating a certain material, I have a set of standard notes. If I have a different material there are different notes. Can I somehow make the expression that controls these notes change value based on the material attribute? I know it is far fetched, but I thought I'd ask.
Thanks
 
Replies continue below

Recommended for you

Yes there is. Go ahead and create at least your first note and then go to Tools -> Expressions... and create some appropriately named expression such as 'Note1' and set it equal to '1'. Now close Expressions and go to Edit -> Suppress Drafting Object... (the last item in the edit menu). It will ask you to select an expression. Either type in the name of the expression that you just created or select the 'Expression' button and it will give you a list of expressions and select the one you just created and then the drafting note and hit OK. Now if edit the expression to a value of '0', the note will be 'suppressed', '1' and it will reappear.

Now you will need to set up expressions to read the current material attribute and then using some IF commands, determine what material is being used and therefore which note to 'unsuppress' keeping all the others suppressed. If you have some problems setting this up, let me know and I can create a simple example showing you how to do this.

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
First off, John you are a wealthof valuable knowledge! thanks for all of your help!
So, how do I make my expression list see attributes list of the part? I didn't think that the expressions could reference these since they are strings.

Here is my scenario:
expressions: steel = 1 // or 0
Attributes: material = Steel // or aluminum


 
OK, look at the attached example (modeled in NX 4).

Note that at the moment, this is difficult to do using the master model mode so my example is done with the drawing and model in the same part.

Open the file and go to Drafting and note the drawing with the note.

Now go into Modeling and go to Tools -> Material Properties... and select the block and note the material that's highlighted, that is the current one assigned. Select the other and hit OK. Now there is a problem with attribute update so for now go to Tools -> Update -> Update for External Change. Now go back to Drafting and note the change in the note. BTW, if you had saved and reopened the file, everything would have been correct since opening the file forces an update.

Anyway, take a look and see if this might work for you.

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
Cypress, CA

To an Engineer, the glass is twice as big as it needs to be.
 
Also,
Is this function available in NX3. Most of our users are still using 3. We are waiting to flip the switch to 4. Thanks again for your help
 
I got this to work by using the function
ug_askAttrvalue("",PART_ATTRIBUTE,"MATERIAL")
IF(ug_askAttrvalue("",PART_ATTRIBUTE,"MATERIAL")="STEEL")(1)ELSE(0)
 
No, this won't work in NX 3 and now that I see the error message that you got, the only reason it works in my version of NX 4 was because someone gave me some extra stuff which I can't remember now where these routines are located. However, all of this works in NX 5 (and even better because now you can now have an expression directly equal to a string).

John R. Baker, P.E.
Product 'Evangelist'
NX Design
Siemens PLM Software Inc.
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