Add a condition to a Model Type
- Last UpdatedSep 10, 2025
- 3 minute read
You can add a condition to a Model Type in the Model Editor and write an expression.
Conditions cause the creation, non-creation, or removal of affected variables, equations, models, ports, connections and external equations. Furthermore, conditions accept all parameter types and must evaluate to a boolean, that is, a value of true or false. Before you can add a condition, you must first create a parameter.
Note: Conditions are similar to IF statements in typical computer programming.
AVEVA Process Simulation evaluates conditions when you first place a Model Type on a Flowsheet, when you change a parameter value, and when you modify a Model Type in the Model Editor.
Some Model Types may have a complex system of conditions to account for the various configurations of variables, equations, submodels, ports, and connections that the Model Type must support. For these Model Types, you can simplify the system of conditions by using nested conditions. A condition is nested when you use it as part of the expression of another condition. You can use the same conditional operators that you use for compound conditional expressions, such as AND, OR, and NOT.
For example, you can write a conditional expression as FlowType==Compressible AND Isentropic, where Isentropic is a nested condition. For this condition to be true, the FlowType parameter must be set to Compressible and the Isentropic condition must also be true.
Create an enumerated parameter and add a condition
-
Open the Model Editor for the Model Type.
-
Expand the Parameters section.
-
Select the
icon.
-
Enter the Name of the parameter; for example, FlowType.
-
From the Type dropdown menu, select Enumeration.
-
Enter a value in the Values column and press Enter; for example, Compressible. To add more values, you must enter in the value and press Enter each time.

-
To set the default enumeration value, select a value from the Default list.
The list is populated from the values you entered in step 5.
-
Enter a Description of the parameter.
-
Expand the Conditions section.
-
Select the
icon.
-
Change the condition Name from the default name.
-
Using the supported Condition operators as a guide, write an expression for your condition that will evaluate to a boolean; for example, FlowType==Compressible.

-
Give the condition a Description.
When the expression syntax evaluates to a boolean, the condition Status changes from red to green.
Connections, variables, equations, models, and ports are now conditionally created when the condition expression evaluates to true.