cancel
Showing results for 
Search instead for 
Did you mean: 

Expressions_Not_Match

Builder
Builder

hello NX Experts,

I am still getting error in Expressions,

eg.
i wanna get variable sizes of keyway , but when i insert the value of that as below,

if(p0=120) then (25.0) else (20) & (if(p0=140) then (35.0) else (20)) & (if(p0=150) then (45.0) else (20.0)) & (if(p0=200) then (45.0) else (20.0)))

but when i change size,Size not changed, got error in expressions,

eg. for when i change size p0 to 120 it changed to 25 , but when i change p0 to 140 , it should be changed to 35.0 , but not got result., it should be changed as i given sizes.

i attached file for more information

anybody have idea for this

Warm Regards
Thomas Roman
Machine Designer
7 REPLIES

Re: Expressions_Not_Match

Phenom
Phenom

You have the 'if' format wrong. It should look more like this, which worked for me:

if(p0=120) then (25.0) else if(p0=140) then (35.0) else if(p0=150) then (45.0) else if(p0=200) then (45.0) else (20)
Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Expressions_Not_Match

Builder
Builder

Hello@Inch,

 

thanks for the help manSmiley Very HappySmiley Very HappySmiley Very Happy

 

got the solution,

 

 

 

 

 

 

 

Warm Regards
Thomas Roman
Machine Designer

Re: Expressions_Not_Match

Builder
Builder
hello@inch

how can i get information like this

any idea for this!!!!!!!!!!!
Warm Regards
Thomas Roman
Machine Designer

Re: Expressions_Not_Match

Phenom
Phenom

I'm a systems developer, so the if/then/else logic just came naturally, but looking in the documentation I couldn't find any examples of complex if statements like you wanted. The description (here) is somewhat minimal.

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: Expressions_Not_Match

Builder
Builder
Understood brother


Thanks again for help



Warm Regards
Thomas Roman
Machine Designer

Re: Expressions_Not_Match

Siemens Phenom Siemens Phenom
Siemens Phenom

Hi @Thomas_Roman, in addition to the documentation, you could also search Solution Center.  You'll find FAQ's and Newsetter articles that expand on many topics discussed in the documentation.  For example, here's a newsletter article written by GTAC's Angie Deering on "Conditional Expressions".

 

Regards, Ben

Re: Expressions_Not_Match

Builder
Builder

Thanks for help @BenBroad

 

i appriciate for that...........

 

 

 

 

Warm Regards
Thomas Roman
Machine Designer