Arbortext IsoDraw > Macro Language Reference > Introduction > Language Basics > Flow Control Statements > If
  
If
The IF statement checks the boolean result of an expression. If the expression is true it evaluates a statement.
IF(expression)THENstatementsELSEstatementsEND IF
expression
Boolean expression that evaluates to TRUE or FALSE
statements
One or more Arbortext IsoDraw Macro Language statements.
IF (drawLine = true) THEN
CREATE LINE 100 100 200 300
ELSE
MESSAGE "No line created!"
END IF
You can include more than one statement in an if statement:
IF (selectLine = false) THEN
CREATE LINE 100 200 300 400
CREATE ELLIPSE 100 500 200 35 45
MESSAGE "ready"
END IF
The IF statement can also be nested:
IF (expression) THEN
true_statement_1
IF (expression) THEN
true_statement
ELSE
false_statement
END IF
true_statement_2
ELSE
IF (expression) THEN
true_statement
END IF
END IF