Use the Macro Settings tab to set up the arguments for a macro and the output from the macro. The Macro Settings tab replaces the Model Settings tab when you are editing a macro. It is opened when you start editing the macro, and can be accessed by clicking on a blank part of the model when you are editing the macro.
For more information about macros see Working with Macros.
For information about using panels, see Using the Properties Panel.
Provides the name of the macro. This will be used in equations when the macro is referenced. It is best if it is both descriptive and relatively short. You may put spaces in the name, just as you would for a variable, and these will be represented with _ when the macro is used.
Macro names must be unique, and no variables can have the same name as a macro. If you do try to change the name of a macro to something already used by a variable in the model the name will not be changed.
If you rename a macro that has already been used, it will be renamed in all the places it is used.
While macro names follow the same conventions as model variables, they will be much easier to use if they do not include any special characters that would require quoting.
Every macro computes a value based on its input. This value is drawn from a variable in the macro definitions. Click on the button at the right to select which variable to use as the output. You may also type the variable name in directly. Until you specify the output, the macro will have errors.
Note If you change the variable name that is used as the macro output you will need to update this field.
Macros can have any number of inputs. If there are no inputs the macros behave like global variables or test inputs. More typically there will be multiple arguments, and they are listed here.
To add an argument click on the button and select the variable that will be used as the argument. For example, delay_time might be an input into a specialized delay macro. This name will be used to describe the arguments in the macro when it appears in an equation.
To remove an argument click on the argument you wish to remove and then click on the button.
To move an argument in the list click on the argument and then click on the or buttons on the right.
Note If you rename a variable you will need to remove the old name and add the new name to the list of arguments. The name will not update automatically in the list.
You can mark an argument as optional by clicking on it and then clicking on the Optional checkbox. When an optional argument is omitted, the equation for the variable in the macro definition will be used. See Macro Example for an example, typically the equation for an optional arguments is based on other arguments.