visual3d:documentation:pipeline:pipeline_commands:conditional_statement
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| visual3d:documentation:pipeline:pipeline_commands:conditional_statement [2024/06/19 12:52] – sgranger | visual3d:documentation:pipeline:pipeline_commands:conditional_statement [2026/02/04 16:38] (current) – wikisysop | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | \\ | + | ====== Conditional Statement ====== |
| - | this command was modelled after the [[visual3d:documentation:pipeline:pipeline_commands:for_each_and_end_for_each|for_each]] command in the sense that there is a start (conditional_statement) and an ending event (conditional_statement_end). | + | This command was modelled after the [[Visual3D:Documentation:Pipeline:Pipeline_Commands:For_Each_and_End_For_Each|For_Each]] command in the sense that there is a start (Conditional_Statement) and an ending event (Conditional_Statement_End). |
| - | when the pipeline comes to an conditional_statement | + | When the pipeline comes to an Conditional_Statement |
| - | the iteration_parameter_name is used to distinguish between different conditional_statement commands so that conditional_statement and conditional_statement_end commands | + | ==== Pipeline Command ==== |
| + | The **Conditional Statement** command | ||
| + | < | ||
| + | Conditional_Statement | ||
| + | / | ||
| + | ! / | ||
| + | ! / | ||
| + | ; | ||
| - | **note:** if there is more than one active file then the conditional_statement | + | Conditional_Statement_End |
| + | / | ||
| + | ; | ||
| + | </ | ||
| + | ====Command Parameters==== | ||
| + | The following table shows the command | ||
| - | **note:** this command was previously called | + | |**Parameter** |**Description**| |
| + | |**Iteration Parameter Name**|The name of the parameter that the conditional statement will apply to (defined before | ||
| + | |**Expression**|Expression for the operation to be applied to the selected signals| | ||
| + | |**As Integer**|True or False: Expression value is stored as integer| | ||
| - | ===== syntax ===== | + | ==== Pipeline Example: Processing Walking and Running Trials |
| - | ==== conditional_statement ==== | + | This script will prompt the user to specify if walking or running trials are being processed. |
| - | + | ||
| - | / | + | |
| - | / | + | |
| - | **;** | + | |
| - | ==== conditional_statement_end ==== | + | |
| - | + | ||
| - | / | + | |
| - | **;** | + | |
| - | ===== pipeline example ===== | + | |
| - | + | ||
| - | this script will prompt the user to specify if walking or running trials are being processed. | + | |
| < | < | ||
| - | prompt_for_pipeline_parameter_value | + | Prompt_For_Pipeline_Parameter_Value |
| - | /pipeline_parameter_name=condition | + | /PIPELINE_PARAMETER_NAME=CONDITION |
| - | /prompt=select condition: | + | /PROMPT=Select Condition: |
| - | /data_type=string | + | /DATA_TYPE=STRING |
| - | /default_value=walk | + | /DEFAULT_VALUE=Walk |
| - | /use_possible_values=true | + | /USE_POSSIBLE_VALUES=TRUE |
| - | /possible_values=walk+run | + | /POSSIBLE_VALUES=Walk+Run |
| - | ! /use_units=false | + | ! /USE_UNITS=FALSE |
| - | ! /default_units= | + | ! /DEFAULT_UNITS= |
| - | ! /use_possible_units=false | + | ! /USE_POSSIBLE_UNITS=FALSE |
| - | ! /possible_units= | + | ! /POSSIBLE_UNITS= |
| - | ! /conversions= | + | ! /CONVERSIONS= |
| ; | ; | ||
| - | conditional_statement | + | Conditional_Statement |
| - | /iteration_parameter_name=statement_1 | + | /ITERATION_PARAMETER_NAME=STATEMENT_1 |
| - | /expression= "&:: | + | /EXPRESSION= "&:: |
| ; | ; | ||
| - | set_pipeline_parameter | + | Set_Pipeline_Parameter |
| - | /parameter_name=test | + | /PARAMETER_NAME=TEST |
| - | /parameter_value=1 | + | /PARAMETER_VALUE=1 |
| - | ! /parameter_value_search_for= | + | ! /PARAMETER_VALUE_SEARCH_FOR= |
| - | ! /parameter_value_replace_with= | + | ! /PARAMETER_VALUE_REPLACE_WITH= |
| - | ! /parameter_value_prefix= | + | ! /PARAMETER_VALUE_PREFIX= |
| - | ! /parameter_value_append= | + | ! /PARAMETER_VALUE_APPEND= |
| - | ! /multi_pass=false | + | ! /MULTI_PASS=FALSE |
| ; | ; | ||
| - | conditional_statement_end | + | Conditional_Statement_End |
| - | /iteration_parameter_name=statement_1 | + | /ITERATION_PARAMETER_NAME=STATEMENT_1 |
| ; | ; | ||
| - | conditional_statement | + | Conditional_Statement |
| - | /iteration_parameter_name=statement_2 | + | /ITERATION_PARAMETER_NAME=STATEMENT_2 |
| - | /expression= "&:: | + | /EXPRESSION= "&:: |
| ; | ; | ||
| - | set_pipeline_parameter | + | Set_Pipeline_Parameter |
| - | /parameter_name=test | + | /PARAMETER_NAME=TEST |
| - | /parameter_value=2 | + | /PARAMETER_VALUE=2 |
| - | ! /parameter_value_search_for= | + | ! /PARAMETER_VALUE_SEARCH_FOR= |
| - | ! /parameter_value_replace_with= | + | ! /PARAMETER_VALUE_REPLACE_WITH= |
| - | ! /parameter_value_prefix= | + | ! /PARAMETER_VALUE_PREFIX= |
| - | ! /parameter_value_append= | + | ! /PARAMETER_VALUE_APPEND= |
| - | ! /multi_pass=false | + | ! /MULTI_PASS=FALSE |
| ; | ; | ||
| - | conditional_statement_end | + | Conditional_Statement_End |
| - | /iteration_parameter_name=statement_2 | + | /ITERATION_PARAMETER_NAME=STATEMENT_2 |
| ; | ; | ||
| </ | </ | ||
| + | ====Notes==== | ||
| + | The ITERATION_PARAMETER_NAME is used to distinguish between different Conditional_Statement commands so that Conditional_Statement and Conditional_Statement_End commands can be unambiguously associated with each other. | ||
| + | |||
| + | **NOTE:** If there is more than one active file then the Conditional_Statement command will be skipped. This is because the expression might be TRUE for some files and FALSE for others, leaving Visual3D in an ambiguous place. | ||
| + | |||
| + | **NOTE:** This command was previously called the Expression_Loop. Scripts referring to this old command name will still work. | ||
visual3d/documentation/pipeline/pipeline_commands/conditional_statement.1718801547.txt.gz · Last modified: by sgranger
