Use nested rule sets to combine AND conditions and OR conditions in a view filter.
This video builds on the examples shown in related videos. It demonstrates the following:
When creating a rules-based filter for views, you can nest together AND rule sets with OR rule sets. By nesting rule sets, you can create powerful filters that specify complex relationships between elements.
For example, suppose you want to find structural shear walls in the model that are concrete-based and have a 2-hour rating. Use nested rule sets to do this. However, you must build the rule sets carefully to get the desired result.
First, open the Filter dialog. From the Properties palette, click Visibility/Graphics Overrides. Select the Filter tab, and click Edit/New. In this case, we will start with an existing filter. Select the filter for concrete walls, and select Duplicate. Provide a name for the new filter, and click OK.
This filter contains an OR rule set to select CMU or concrete walls. Now add an AND rule set to include information about structural and shear wall requirements. Click Add Set. Use the drop-down to select AND, and define the rules to filter for structural shear walls and 2-hour walls, and click OK.
Add the new filter to the view, and set it to override the fill pattern to solid red. Click OK to apply the filter.
You see the results are not what we are looking for. The filter has selected all of the concrete and CMU walls regardless of the structural properties or the fire rating, and the filter has selected the structural wood wall with a rating. Let's open the Filters dialog again to see what happened.
The top-level rule set uses the OR condition, so any rules that are true will trigger the filter. The nested AND rules are nested to the OR condition, as a result, it has included walls we were not expecting. To fix this, in the top-level rule set, use the AND condition to identify structural and 2-hour rated walls first, and then use the OR function to further refine the filter.
Apply this filter to the view instead. Now we have the results we are looking for.
When building nested filters, it is important to understand the relationship between the AND and OR conditions to get the results you need. In some cases, you may want to test the filters on smaller examples first to make sure the filters will give the desired results.