I get a lot of wish lists at work. The latest one was how to show both ordinary hazard and light hazard sprinkler coverage within a sprinkler family, but also have the option to not show it at all. The intention is to allow quick initial layouts or spot checks of coverage in accordance with Australian Standards without having to maintain separate views with separate view templates.
To be honest, I’m not convinced of the validity of this method over simply turning off the visibility of subcategories in Visibility/Graphics, but it was a nice chance for a quick “Well sure I can do that!” There is nothing stopping the end user from overriding the display of the subcategories either.
In the below image, within the same family we have the coverage for ordinary hazard, light hazard and no coverage displayed, controlled by 2 tick boxes.

So how do we achieve this?
With a fairly simple combined AND / NOT statement within the Revit family.
I have used 4 instance parameters to achieve the above results. These parameters are ShowOrdinaryHazard, ShowLightHazard, DisplayCoverage and OrdinaryHazard.
The two parameters ShowOrdinaryHazard and ShowLightHazard are driven by DisplayCoverage and OrdinaryHazard and are the only parameters the end user is able to change.
The formulas used are
ShowOrdinaryHazard = and(OrdinaryHazard, DisplayCoverage)
Which only ticks ShowOrdinaryHazard if both OrdinaryHazard and DisplayCoverage are checked.
ShowLightHazard = and(not(ShowOrdinaryHazard), (DisplayCoverage))
Which only ticks ShowLightHazard if DisplayCoverage is checked but ShowOrdinaryHazard is not checked.
Of course, as mentioned in the 2nd paragraph, I’m not convinced of the validity of this method, at least for this implementation. Subcategories and view templates are all you really need. Why complicate things just because you can?

