cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to write relation

SOLVED
Highlighted
Level 12

How to write relation

Hi all,

i have been trying to figure out how to write a relation, but without success. I have a parameter P1 which has a string value of 2A. I am trying to make the diameter of a cylinder = 102mm if P1 = 2A, so how do i write this? I tried the following but it did not work

IF(P1==2A)

d233=102

ENDIF

I guess a string value cannot be used in a relation in this way.

Regards

John

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to write relation

Hello John.

In to relation you can write a parameter with string value - do you need add an apostrophe - in your case: '2A'

For example:

IF(STRING_PARAM=='2A')
d6=d4
ENDIF

string-rel.png

Note: you can not use P1 parameter - this parameter is reserved by system

Best Regards,
Vladimir Palffy
2 REPLIES 2

Re: How to write relation

Hello John.

In to relation you can write a parameter with string value - do you need add an apostrophe - in your case: '2A'

For example:

IF(STRING_PARAM=='2A')
d6=d4
ENDIF

string-rel.png

Note: you can not use P1 parameter - this parameter is reserved by system

Best Regards,
Vladimir Palffy

Re: How to write relation

Thank you Vladimir, that worked for me.

Best Regards

John