The Guard parameter is a special type of parameter used to control the activation or deactivation of objects based on the values of other parameters. The "Guard" parameter is utilized in conjunction with Logical Statements.
In the Library, the "Guard" parameter should be positioned beneath the "Group" object. It is important to note that each "Guard" parameter that is connected to the same parameter must be placed within a separate “Group” object.
Example Syntax:
... <O N="GP1" T="Group"> <O T="--"> <P N="Guard" V="ColumnType .EQ. Rectangular" /> ... </O> <O T="--"> <P N="Guard" V="ColumnType .EQ. Circular" /> ... </O> </O>
List of Logical Statements
The following are some of the logical statements that can be used within the expressions of Guard parameters:
.EQ. → Equal to (==)
.NE. → Not equal to (!=)
.LT. → Less than (<)
.LE. → Less than or equal to (<=)
.GT. → Greater than (>)
.GE. → Greater than or equal to (>=)
.AND. → AND (&&)
.OR. → OR (||)
.NOT. → NOT (!)
Example:
<O N="GuardObject1" T="Project" Category="Logical Statement and Test" TransAlignRule="Right"> <!-- created by ParamML Examples on 09.02.2023 --> <O N="Column_Type" T="Group"> <P N="Rectangular" V="1" Category="Column_Type" /> <P N="Circular" V="2" Category="Column_Type" /> </O> <O N="Input" T="Group"> <P N="W" V="10" D="column width" Role="Input" Category="Input" /> <P N="L" V="10" D="column length" Role="Input" Category="Input" /> <P N="D" V="10" D="column diameter" Role="Input" Category="Input" /> <P N="H" V="100" D="column height" Role="Input" Category="Input" /> <P N="ColumnType" V="Circular" Role="Input" Category="Input" /> </O> <O N="Geometry" T="Group"> <O T="Surface" Z="0"> <P N="Guard" V="ColumnType .EQ. Rectangular" /> <P N="Thickness" V="H" /> <O T="Point" X="0" Y="0" /> <O T="Point" X="W" Y="0" /> <O T="Point" X="W" Y="L" /> <O T="Point" X="0" Y="L" /> </O> <O T="Circle" Z="0"> <P N="Guard" V="ColumnType .EQ. Circular" /> <P N="Thickness" V="H" /> <P N="Radius" V="D/2" /> </O> </O> </O> |
---|
Navigate to the OpenBrIM App and search for your desired object. Change the values of the "ColumnType" cell to "1" and "2" within the OpenBrIM app. |
To view this example in the library, see (https://openbrim.org/platform/?application=inc&author=ParamML_Examples_OpenBrIM+Platform&folder=Logical+Statement+and+Test&obj=objidqqxhbra6yog0phza05hea) |
0 Comments