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
| Direction | Name | Type | Description |
|---|---|---|---|
| Input | Input Value N1 | Number | A value to use as a variable. |
| Input | Input Value N2 | Number | A value to use as a variable. |
| Input | Input Value N3 | Number | A value to use as a variable. |
| Input | Input Value N4 | Number | A value to use as a variable. |
| Output | Output Value N1 | Number | A value to use as a variable. |
| Output | Output Value N2 | Number | A value to use as a variable. |
| Output | Output Value N3 | Number | A value to use as a variable. |
| Output | Output Value N4 | Number | A value to use as a variable. |
Properties
| Property | Type | Description |
|---|---|---|
| Allow Run | Boolean | Determines whether the module is allowed to execute. Turn on to allow this module to run. |
| Execute | Button | Executes the script immediately. |
| Filename | File | The script which is run whenever appropriate triggers occur. A new script can be created from a template. |
| Triggers | Parameter list | The parameters used to trigger the script to execute. |
| Run On Load | Boolean | Determines whether the module is allowed to execute when the application is being loaded. Turn on to allow this module to run on load. |
Variables
| Property | Type | Description |
|---|---|---|
| N1 | Double | Number passed into script. |
| N2 | Double | Number passed into script. |
| N3 | Double | Number passed into script. |
| N4 | Double | Number passed into script. |
| Trigger | String (read-only) | The parameter which triggered the script. |