Examples of Rule-Based Filters

Study these examples to learn how to build rule-based filters to apply to views.

You can create multiple rules and multiple rule sets. Rule sets can be nested.

There is no limit to the number of rules and rule sets you can define. Plan filter rules carefully using AND and OR conditions and nesting to make sure you get the desired result.

Tip: Create a sample model that contains elements with the categories you want to use in the filter. Experiment by creating filters with rules and applying the filters to views until you achieve the desired result. Then use Transfer Project Standards to transfer the filters to your project.

Simple AND condition

When a rule set uses the AND condition, all of its rules and nested rule sets must be true.

Consider the following example:

Simple OR condition

When a rule set uses the OR condition, one or more of its rules or nested rule sets must be true.

If you want to select multiple values for a parameter, add one rule for each value. Nest these rules under a rule set with an OR condition.

Consider the following example:

Nested rule sets

When filter rules include nested rule sets, use the AND and OR conditions carefully, in the correct order, and with appropriate nesting.

For some results, you must use AND with a nested OR condition. For other results, you must use OR with a nested AND condition. The results can differ greatly, and you must be very careful to use the appropriate filter rules to achieve your goals.

Goal: You want to identify all shear walls in the model that are made of concrete and that have a 2-hour fire rating.

In your model, the names of wall types may contain the words "concrete" or "CMU", or their material is indicated using the Structural Material parameter.

OR with a nested AND -- Does not achieve the goal

If you create the following filter, using an AND rule set nested within an OR rule set, you will not achieve the goal.

  • For the category Walls, that filter reflects the following formula:

    Type Name contains "concrete"

    OR Type Name contains "CMU"

    OR Structural Material = "Concrete Masonry Units"

    OR Structural Material = "Concrete, Cast-in-Place gray"

    OR (Structural Usage = "Shear" AND Fire Rating = "2-hr")

  • This filter does not achieve the desired result. It identifies walls that are concrete OR walls made of any material that are shear and have a 2-hour fire rating.

AND with a nested OR - Achieves the goal

In this case, to identify all shear walls in the model that are made of concrete and that have a 2-hour fire rating, you must start with the AND rule set, and nest an OR rule set within it, as follows:

  • For the category Walls, this filter reflects the following formula:

    Structural Usage = "Shear"

    AND Fire Rating = "2-hr"

    AND (Type Name contains "concrete" OR Type Name contains "CMU" OR Structural Material = "Concrete Masonry Units" OR Structural Material = "Concrete, Cast-in-Place gray")

These examples demonstrate why it is critical to think carefully about what you are trying to accomplish, and why it is so important to plan the filters and test them thoroughly.