Cancel
Showing results for 
Search instead for 
Did you mean: 

If, &, OR Functions in expressions

Experimenter
Experimenter

Hello,

 

I'm making a design with supress by an expression.

I know in SolidWorks there is an option to make an equation, with OR in it

 

like this;

 

IF ("bolts" = 0 OR "number_of_extra_bolts" < 1, "suppressed", "unsuppresed"

 

I want to do the same thing in NX9, I'm already using & functions, like this, but I want it like an OR function like in solidworks

 

if("V608673/AA"::number_of_extra_bolts<1 & "V608673/AA"::bolts=false) (0)else(1)

 

Can somebody help me?

2 REPLIES

Re: If, &, OR Functions in expressions

Siemens Legend Siemens Legend
Siemens Legend

Yes you can do operators like OR and AND, but they are represented slightly different, you can see here:

 

https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_help/#uid:index_modeling:expressions_exp_ov:ex...

 

and

 

https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_help/#uid:index_modeling:expressions_exp_ov:ex...

 

These work in NX 9.

 

So to create an expression with an OR comes out like:

 

extra_bolts = if(length > 150 || width >75)(5) else (0)

 

So in this case if the length is greater than 150 or the width is greater than 75 I get 5 extra bolts.

 

Regards

 

Paul

 

 

Re: If, &, OR Functions in expressions

Experimenter
Experimenter

Thanks!!!