trigger script

trigger script

trigger script provides a powerful way to link the parameters and actions of multiple modules. It allows a sequence of events to be “triggered” as the result of one or more parameters changing.

The module requires a Python script, which runs when any of the triggers you add changes. Triggers are module parameters that might change and thereby cause the script to run. The script can do just about anything. A new script created from the module starts from a template that lists the available variables.

In addition to the triggers you specify, there are 4 input (and output) ports that accept numbers (such as a plume level). These are available in your script as the variables N1 through N4, and are more readily accessible than values set by editing the Python script. The Trigger variable holds the parameter that caused the script to run.

Ports

DirectionNameTypeDescription
InputInput Value N1NumberA value to use as a variable.
InputInput Value N2NumberA value to use as a variable.
InputInput Value N3NumberA value to use as a variable.
InputInput Value N4NumberA value to use as a variable.
OutputOutput Value N1NumberA value to use as a variable.
OutputOutput Value N2NumberA value to use as a variable.
OutputOutput Value N3NumberA value to use as a variable.
OutputOutput Value N4NumberA value to use as a variable.

Properties

PropertyTypeDescription
Allow RunBooleanDetermines whether the module is allowed to execute. Turn on to allow this module to run.
ExecuteButtonExecutes the script immediately.
FilenameFileThe script which is run whenever appropriate triggers occur. A new script can be created from a template.
TriggersParameter listThe parameters used to trigger the script to execute.
Run On LoadBooleanDetermines whether the module is allowed to execute when the application is being loaded. Turn on to allow this module to run on load.

Variables

PropertyTypeDescription
N1DoubleNumber passed into script.
N2DoubleNumber passed into script.
N3DoubleNumber passed into script.
N4DoubleNumber passed into script.
TriggerString (read-only)The parameter which triggered the script.