Skip to main content
1-Visitor
March 18, 2011
Solved

How to write relation

  • March 18, 2011
  • 1 reply
  • 2463 views

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

    Best answer by VladimirPalffy

    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

    1 reply

    14-Alexandrite
    March 18, 2011

    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

    1-Visitor
    March 18, 2011

    Thank you Vladimir, that worked for me.

    Best Regards

    John