Using EXECUTE Statements inside IF-ENDIF Statements
EXECUTE statements can be used inside IF-ENDIF statements as a way to avoid execution of the lower-level model, unless necessary. If not executed, the current values of the model are used.
For example:
INPUT
key YES_NO
"Does the assembly have a key (Y/N):"
IF key == YES
key_name STRING
"Enter key name:"
ENDIF
END INPUT
RELATIONS
END RELATIONS
IF key == YES
EXECUTE PART (key_name)
END EXECUTE
ENDIF
The part keyname is executed only if it is included in the assembly.