> For the complete documentation index, see [llms.txt](https://docs.openbrim.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openbrim.org/developers/paramml-developer-guide/logical-statements-and-test/guard-parameter.md).

# Guard Parameter

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 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:**

```xml
<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. ![](https://openbrim.atlassian.net/wiki/download/attachments/2163736790/image-20230209-124928.png?api=v2) ![](https://openbrim.atlassian.net/wiki/download/attachments/2163736790/image-20230209-125125.png?api=v2) 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>)

**Example:**

In the example provided, if the authors enters "2" as the value for the "DATA" parameter, only the "Guard" value in the group named "G2" is correct and functional, while the other groups are disregarded because they are incorrect.

As a result, the value of the "DataOutput" parameter will be 9 when "DATA" is equal to "2".

If the value of the "DATA" parameter is set to "1", then the "DataOutput" parameter will be equal to 5.

And, if the "DATA" parameter is set to "3", the value of the "DataOutput" parameter will be equal to 13.

```xml
<O N="GuardObject2" T="Project" Category="Logical Statement and Test" TransAlignRule="Right">
    <!-- created by ParamML Examples on 09.02.2023 -->
    <P N="DATA" V="2" Role="Input" />
    <O N="G1" T="Group">
        <P N="Guard" V="DATA .EQ. 1" />
        <P N="DataOutput" V="5" />
    </O>
    <O N="G2" T="Group">
        <P N="Guard" V="DATA .EQ. 2" />
        <P N="DataOutput" V="9" />
    </O>
    <O N="G3" T="Group">
        <P N="Guard" V="DATA .EQ. 3" />
        <P N="DataOutput" V="13" />
    </O>
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2163736790/image-20230209-133858.png?api=v2) 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=objidzfupeaejm6bj2p3fjbfjs>)

**Example:**

```xml
<O N="GuardObject3" T="Project" Category="Logical Statement and Test" TransAlignRule="Right">
    <!-- created by ParamML Examples on 09.02.2023 -->
    <P N="BeamSec" V="1" D="BentCapType[T_Section=1/Box_Section=2]" Role="Input" />
    <O N="T_Section" T="Group">
        <O N="Beam" T="Volume" Y="0" X="35000" Z="0">
            <P N="Guard" V="BeamSec .EQ. 1" />
            <O N="y_axis_outeredge" T="Surface" Y="-10000">
                <O T="Point" Y="0" X="475" Z="0" />
                <O T="Point" Y="0" X="475" Z="-898.62" />
                <O T="Point" Y="0" X="1250" Z="-898.62" />
                <O T="Point" Y="0" X="1250" Z="-2000" />
                <O T="Point" Y="0" X="-1250" Z="-2000" />
                <O T="Point" Y="0" X="-1250" Z="-900" />
                <O T="Point" Y="0" X="-475" Z="-900" />
                <O T="Point" Y="0" X="-475" Z="0" />
            </O>
            <O N="y_axis_inneredge" T="Surface" Y="10000">
                <O T="Point" Y="0" X="475" Z="0" />
                <O T="Point" Y="0" X="475" Z="-898.62" />
                <O T="Point" Y="0" X="1250" Z="-898.62" />
                <O T="Point" Y="0" X="1250" Z="-2000" />
                <O T="Point" Y="0" X="-1250" Z="-2000" />
                <O T="Point" Y="0" X="-1250" Z="-900" />
                <O T="Point" Y="0" X="-475" Z="-900" />
                <O T="Point" Y="0" X="-475" Z="0" />
            </O>
        </O>
    </O>
    <O N="Box_Section" T="Group">
        <O N="Beam" T="Volume" Y="0" X="3500" Z="-900">
            <P N="Guard" V="BeamSec .EQ. 2" />
            <O N="y_axis_outeredge" T="Surface" Y="-10000">
                <O T="Point" Y="0" X="1250" Z="-1100" />
                <O T="Point" Y="0" X="-1250" Z="-1100" />
                <O T="Point" Y="0" X="-1250" Z="0" />
                <O T="Point" Y="0" X="1250" Z="0" />
            </O>
            <O N="y_axis_inneredge" T="Surface" Y="10000">
                <O T="Point" Y="0" X="1250" Z="-1100" />
                <O T="Point" Y="0" X="-1250" Z="-1100" />
                <O T="Point" Y="0" X="-1250" Z="0" />
                <O T="Point" Y="0" X="1250" Z="0" />
            </O>
        </O>
    </O>
</O>
```

![](https://openbrim.atlassian.net/wiki/download/attachments/2163736790/image-20230209-140153.png?api=v2) ![](https://openbrim.atlassian.net/wiki/download/attachments/2163736790/image-20230209-140713.png?api=v2) 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=objidyr0zzfb10fq41ob475ak8h>)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openbrim.org/developers/paramml-developer-guide/logical-statements-and-test/guard-parameter.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
