An MP step within a script performs 3 operations:
It gathers the necessary data to perform a calculation or operation
It performs that operation
It returns information that can be used by other MP steps.
To accomplish this each MP command is built as a table that contains a selection of rows. These rows then can be configured to provide the input the step needs and return the information you are looking to obtain.
Each MP Step operates either as a direct switch to control an aspect of SA, as a computational unit, or as a combination of the two. It can be given information which is then used when the step is run (executed) to produce a return with the results of the operation.
Input Arguments. These are values that can be supplied to a command as input. They help the command determine what it is supposed to do. Most input arguments are required, but some are optional.
Return Arguments. Return arguments are used to return information or results back from a command after it executes. These rows are marked as "Result Only" and the entry field section is grayed out.
A great example is the command Double Math Operation.
In order to perform a math operation in MP, let's say you want to compute 3*5... you would add a step to your script and configure it like this:
The first Input Argument (A0) is the first value to use (3). This is followed by the math operation to perform (*) in A1 and then the second value to use (5). The last row in this MP step is a return Argument which will return the value it computes this step is executed. If you were to enable debugging and run this script you would see the following result:
A basic calculation like the one above is not very interesting because you need to know what numbers to use before you start the script. However you can build links from one step to another which allows more complicated tasks to be performed. For example if you want to compute 3* the diameter of Circle 2, I could use one step to compute retrieve the diameter Circle 2 and then use that value in my calculation:
The Reference button on the right side of an argument can be use to quickly set the arguments mode of operation to Reference and get a visual display of other step arguments in my script that are of the same type to select.
Argument Quick Select button controls
The quick select buttons at the right set the Entry method for a step so that the method does not have to be selected from the drop-down list.
Enter Value . This button resets a step to a manual entry method.
Reference . This button sets the operation to reference and starts a reference prompt for selection.
Variable .
Dialog Entry . This button offers an F2 Select dialog to pick from the tree or enter names.
Steps can Fail for a number of reasons. As a rule of thumb Steps can return the following conditions:
Failed. A step fails when it is missing critical information in order to complete. This typically causes the script to stop in order for the problem to be addressed.
Partial Success. Partial failures can be returned. These typically indicate an unexpected result rather than a problem with the MP. For example a best-fit can have a tolerance set. If the points cannot be found the step will fail, but if it fits but the fit is out of tolerance you get a partial success.
Success. Everything worked as expected.
The response of the MP script to these events depend on your settings. Use the command Set Interaction Mode to change this behavior such that a failed step is ignored (when possible) and error handling can be built in to the script. This is call “Silent mode”.
Additional Fundamental Terms