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.
When a rule set uses the AND condition, all of its rules and nested rule sets must be true.
Consider the following example:
Structural Usage = "Shear" AND Fire Rating = "2-hr"
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:
Type Name contains "concrete"
OR Type Name contains "CMU"
OR Structural Material = "Concrete Masonry Units"
OR Structural Material = "Concrete, Cast-in-Place gray"
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.
If you create the following filter, using an AND rule set nested within an OR rule set, you will not achieve the goal.
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")
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:
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.