The analysis section offers several different views depending on what's needed. Use the selection bar in the middle of the left panel to select the desired content for display.
If the Analysis section is not visible you may need to use the Two layer button at the top to show it again:
The connections option offers a means to see how a particular MP step in your script is inter-connected with other MP commands. To use this option first select Connections from the dropdown list and then select a particular MP step in your script:
Doing so will display two categories of steps:
Referenced By. Shows a list of all the Steps in your script that reference the command you just selected as well as the specific argument in that step that has the link.
References: Shows a list of the steps that are referenced by the selected command as inputs for its operation.
The Find Results option works in conjunction with the MP Search window to show you which commands were found when searching your script.
It is often important to be able to find specific entries within a long script quickly an efficiently. The MP Find and Replace functions were added to fill that need. The MP Search button (also accessible through Ctr+F for find or Ctr+H for Replace) will bring up a dialog for this application.
This dialog is designed to work in conjunction with the Find Results View panel (Variables, Find Results and Connections View). To find the entry you are looking for consider the following:
Open the Find and Replace dialog (Ctr+F).
Select from the check boxes to identify what you are looking for. You can search all fields by checking each box or isolate your search to just one fields such as the “Argument Value” which is the entry field for most arguments.
Press the Find All button once to build a list.
At this point you can either use the Prev and Next to navigate through the results or close the Find and Replace dialog entirely and use the forward and backward buttons at the top of the editor. These buttons will move the focus in the script from one entry to the next in sequence.
However, the fastest way to navigate through your search results is to look in the Find Results View panel. This panel will show you a list of steps and individual arguments within those steps that include the search results. Simply click on and entry to navigate to that specific argument in the script.
Click on the command in the Find Results window to navigate to the particular step that was found in your script.
The MP Find and Replace dialog will identify items that are both in the primary script and within a list. However, it will not allow you to navigate through a list to find a single entry. In order to find a single point name in a long list of names for example a second search button has been added to the List dialog.
Most if not all programming languages support the concept of variables. Variables allow you to define a name that is associated with a value. This allows you to refer to that value by name. The advantage of this is that while a script is running, you may change or overwrite the value of that variable, but anywhere you refer to it by name, you’ll always retrieve its current value. In many scripting situations, this can lead to dramatically simpler scripts.
Variables must be of the appropriate data type to store a given value. For instance, an integer variable can store a whole number, but it cannot store a double. Likewise, a point name variable can store a point name, but it cannot store a vector.
You can define a variable by using the Set [ ] Variable commands. (There is a different command for each variable type). These commands create a variable with the specified name that stores the specified value. You can then refer to that value by its variable name.
To overwrite or change the value stored under a variable, simply use another Set [ ] Variable command using the same variable name.
To Enter a Variable Argument:
Ensure that the entry method drop-down for the desired argument is set to Variable, or click the button.
Type the name of the variable into the argument’s value field.
The value of the variable will be retrieved at the time the command is executed and used as the argument’s value.
In the bottom-left-hand side of the MP Editor is a drop-down that allows you to select the Variables view.
The Variables view allows you to see all of the defined variables in the current script, as well as their data type. Additionally, while debugging, the value of the variable at the current point of execution is displayed in the Value column.
In addition to debugging uses, having a list of defined variables available allows you to easily reference the name when typing a variable in by hand.
Some lists, such as Point Name Reference Lists and Collection Object Name Lists also support a special Ctr+Shift double click option to display a new panel with the names of the items defined in the variable while in debug mode