trigger script
The trigger script module provides a powerful way to link parameters and actions of multiple modules. This gives you the ability for a sequence of events to be “triggered” as the result of one or more parameters changing.
The module requires a Python script be created, which runs when you “Add” triggers. Triggers are module parameters that might change and thereby cause the script to be run. The script can do just about anything.
In addition to the triggers that you specify, there are 4 input (and output) ports that accept numbers (such as a plume level) that can be used in your script, and are more readily accessible without editing the Python script.
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. Set to True to allow this module to run. |
| Execute | Button | Executes the script immediately. |
| Filename | String | The script which is run whenever appropriate triggers occur. |
| Triggers | String | 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. Set to True to allow this module to run. |
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 | The parameter which triggered the script. |