×
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

Trouble with a simple expression

Trouble with a simple expression

Trouble with a simple expression

(OP)
hello,

it's the first time i write in this fantastic forum (i read your tips every day).
I have a trouble with a simple expression.

In my drawing file i have one part attribute called p1 that can have this two string value: "Released" or "working".
according to the value assumed i need to fill another part attribute call p5 with a specific value.
So i try to insert a conditional like this:

if p1=stringValue( Released ) then p5=stringValue( Approved ) else p5=stringValue( Not Approved )

every time the program tell me that the string contain a syntax error..

i use NX 8.5.3

where is the fault?

Thanks.

Luca

RE: Trouble with a simple expression

Try this

(if (P1="RELEASED")("APPROVED")else("NOT APPROVED"))

RE: Trouble with a simple expression

Is it a single = typically ued for setting a value or should it be a double == typically used for comparisons?
I have not used NX in a few years, but I know Wildfire uses the = and == like I asked about.
Regular Expressions also uses the = and == that way.

Also in your screen shot, you have P1 set to Release and your P5 evaluation is looking for Released.


"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: Trouble with a simple expression

If you're running NX 8.5 I would use something like a pre-defined String Attribute limited to either the value of 'Not Released' or 'Released' and then just link my note to the the value of that Attribute. Then when you want to change the status, just go to...

File -> Properties -> Attributes

...and simply toggle between the two pre-defined values of the 'Release_Status' attribute, as you can do with the attached example file.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
Siemens PLM:
UG/NX Museum:

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

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