Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi all,
i am trying to figure out (without success) how to write a relation. I want to control a diameter when another diameter is a given value. For example, if diameter A = 100 then diameter B = 120. I thought the following would work, but it does not, i get error in relations.
IF A=100
THEN B =120
ENDIF
Regards
John
Hi Oliver,
thank you for the reply, that worked, sort of. I actually want to add more than one relation, so when A=100, B=120, but i also want when A=110, B=120 & A=120, B=130.
These are not the actual values i require, i have used them for simplicity, the actual figures do increase by 10 each time, they are more random.
Regards
John
Ok, i figured it out. I dropped the last 2 lines, ELSE & B=100. Now things are working in exactly the way i wanted. Thank you for pointing me in the right direction Oliver.
Kind Regards
John
John,
I assume you picked up the subtle syntax distinction relative to your initial post. When using a conditional statement line (like IF), "equals" is rendered ==; when setting something to a value, "equals" is rendered by =.
Since you have more than 2 states, as you have discovered, you want multiple IF..ENDIF sections, rather than one IF...ELSE...ENDIF section.
David
Your relations could also have the form:
IF A==...
B=...
ELSE
IF A==...
B=...
ELSE
IF A==...
B=...
ELSE
.
.
.
ELSE
B=...
ENDIF
ENDIF
ENDIF
.
.
.