After adding and setting up parameters of calculation algorithm it is available to set up calculation algorithm execution conditions by means of branching. Branching is used to create conditions for executing single elements of calculation algorithm.
To set up calculation algorithm execution conditions:
Click the Branching button on the Home ribbon tab. As a result, a branching in the calculation tree and the Else condition are created:
Select the created branching and select the Branch item in the drop-down menu of the Branching button. As a result, a branch is created in the branching:
NOTE. The number of branches in the branching is unlimited. If there are several branches, only the first branch, which condition is executed, is calculated by default. To check the condition and execution of other branches, select the Execute All Appropriate Branches branching's context menu item. All branches, which conditions are executed, are executed on algorithm calculation.
Drag calculation algorithm elements to the Branch and Else conditions:
Open the Branching Parameters dialog box to set calculation block execution conditions:
Double-click the Branch object in the calculation tree.
Select the Edit item in the context menu of the Branch object in the calculation tree.
As a result, the Branching Parameters dialog box opens:
Click the Add button on the toolbar to add a condition:
Set parameters:
Type. Select the condition type in the drop-down list:
Parameter.
Formula.
Branching Parameter. In the drop-down list select the object parameter that will be used in the condition.
NOTE. There is no parameter for the Formula type.
Condition. Select the condition in the drop-down list:
Contained.
Not contained.
NOTE. There is no parameter for the Formula type.
Value. Set values for the selected condition type:
Parameter. Select the value in the drop-down list that will be compared with the branching parameter value.
Formula. To set condition formula, click the button and create a condition formula identically to setting up calculation formulas in the Branch Condition Formula dialog box that opens:
AND/OR. Select one of logical operators in the drop-down list if several conditions are added:
AND. It is used by default. If all conditions are executed, the calculation algorithm is executed too.
OR. If at least one condition is executed, the calculation algorithm is executed too.
To delete one of the conditions, select the condition and click the Delete button on the toolbar.
To delete all conditions, click the Clear button.
The example creates a branching with two branches, each of the branches has algorithm calculation execution conditions.
See also: