×
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

Using "AND" in expressions

Using "AND" in expressions

Using "AND" in expressions

(OP)
Is it possible to set multiple values in an expression using "AND"?
For instance:
p1="ABC"
OD=1.0
ID=if(p1="ABC")then (.5) AND OD=1.5
This is using NX8.5
I also don't know any of the syntax required if this is possible.
Thanks

RE: Using "AND" in expressions

From the NX Documentation

Relational, Equality and Logical Operators

>
Greater Than

<
Less Than

>=
Greater Than or Equal

<=
Less Than or Equal

==
Equal

!=
Not Equal

!
Negate

& or &&
Logical AND

| or ||
Logical OR

John Joyce
N.C. Programming Supervisor
Barnes Aerospace, Windsor CT
NX6, NX7.5 & NX8.5
Vericut7.2.3

RE: Using "AND" in expressions

I'm not aware of anything like that. You're just going to have to define multiple IF statments; one for the ID and one for the OD.

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.

RE: Using "AND" in expressions

Note that the 'AND' and 'OR' are only for use in the logic portion (inside the first pair of parenthesis) of the IF statement. They are not there so as to allow the setting of multiple variables. BTW, the use of the 'THEN' betweent the first and second set of parenthesis is purely optional, however you must include an 'ELSE' between the second and third.

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.

RE: Using "AND" in expressions

(OP)
Thanks for the clarification John

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