With the Dynamic tree, parts can be subject to conditions. This is accomplished by Choose and When elements:
·The Choose element references a ParameterRef (must be of integer or enum parameter type) whose value is used to determine the active When element.
·Below the Choose, any number of When elements are present, each with a test condition. One of the When elements may be marked as default. When determining the active When, all the test conditions are evaluated and the first matching one make its When element active. If none of the other When elements are active and there is a default When, this will be made active.
·Choose/When may be nested. Subordinate Choose elements are only evaluated if the parent When is active.
For ETS4/ETS5, the following expressions are allowed for test:
·a single numerical value
·a list of numerical values (in decimal representation!), separated by space characters
·a comparison with a numerical value (in decimal representation!) and one of the following comparison operators: = != < <= > ≥,
For ETS3, only the first syntax is allowed
There may be at most one When element with default = true.
For ETS3, if a default element is present, it must be the only When element below a Choose.
To add a condition
·Select the element where the condition shall be added (e.g. ParameterBlock) and execute the Add New Choose command
·Select the ParameterRef controlling the presence of the parameter or communication object. Only ParameterRefs with a ParameterType of type Number or Restriction) are selectable.
·Below the created Choose element, create a When element specifying the condition
Shortcut: If you select the Add New Choose command in the context menu of a ParameterRefRef, the new choose will be added just below the ParameterRefRef and reference the same ParameterRef.