Guard is a special parameter that is used to deactivate or activate objects based on the parameters set.
In this example, column types are enumerated in a Group Object named Column Type. Then based on the value selected in ColumnType Parameter in the Input Group Object the geometry will generate either a rectangular column if ColumnType = Rectangular or a circular column if ColumnType = Circular.
Example:
<O N="Column Design" T="Project">
<O N="Column Type" T="Group">
<P N="Rectangular" V="1" />
<P N="Circular" V="2" />
</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>
List of Logical Operators
Here is a list of logical operators that can be used inside the expressions of Guard parameters.
.AND.: and &&
.OR.: or ||
.LT.: less than <
.LE.: less than or equal to <=
.GT.: greater than >
.GE.: greater than or equal to >=
.EQ.: equal to ==
.NE.: not equal to !=
.NOT.: not !