Program > Editing a Design > EXECUTE Statements > Specifying a Part to Execute in an Assembly Program
Specifying a Part to Execute in an Assembly Program
When you are using an assembly program to replace a part in the assembly using interchangeability records, you can make sure that the appropriate part program is executed by entering the part name as a variable in the EXECUTE statement. This operation is similar to using a variable in anADD PART statement.
For example, an assembly program could look like this:
INPUT
COMPONENT STRING
"Enter part name"
DIAMETER NUMBER
END INPUT
....
EXECUTE PART (COMPONENT)
d1=DIAMETER
END EXECUTE
If an EXECUTE statement passes values to variablesA and B, and an INPUT statement declares only the variable A, the following occurs:
A warning message informs you that the variable B has not been defined. You can then edit your design to correct the error.
If you incorporate changes in the model after ignoring the warning, the value of A is passed to a parameter with the same name in the part being executed.
Was this helpful?