Creating Element Filters
Related Articles: Intro to Element Filters
In this article, we will demonstrate several examples to show you the options available for creating Element Filters.
With the release of Element Filters, you will notice that the software no longer ships with the Show/Hide/Isolate buttons on the ribbon. Instead, the software ships with pre-built Element Filters that replace this functionality. Though these are already provided, they provide a good opportunity to walk through the creation of a filter.
Example #1 - Building the "Hide" Element Filter
Start by giving your filter a name. You also have the option to define a group and sub group. The name and grouping will help you organize your filters in the Element Filter palette.
Next, you will want to select the categories you want this filter to apply to. It is always easiest to start small, so you might start by just selecting one category so that you can be sure that your filter works before applying other categories. In the example below, you will see that we have only selected the MEP Fabrication Pipework category.
In the Rules section, you can add specific parameter requirements. It is not required to add these rules. Be sure to click on the "Add Condition" button to create your first condition in the rule set.
Your first option in the condition is to select a parameter.
Next, select your operator. The most common operator is "Contains" as you only have to type in partial matches. However, in this one, we are going to enable the user to select the pipe or duct to set this value for the rule so we are going to use "is equal to".
Input type offers a few options:
- Constant Value: You will type in the criteria in the Value field. For example, if we are searching for chilled water you might use the "contains" operator, "constant value" input type and CHW in your value field.
- Prompt for Value: This option will force a dialog in front of the user for the Value to be used. If you type something in the Value field of the rule, then the text is used in the dialog's prompt or in the Revit status bar, depending on the Input Type option.
- Compare to Parameter: Use this to look for true false matches of two parameters.
- Single Element Selection: When the rule is activated, you are only allowed to select one element in the model then the rule acts on that object. For example, you might want to select all objects that match the same service type or service abbreviation so your rule would ask the user to select one object and find all matches in the model.
- Multiple Element Selection: Since we want to duplicate the old Hide button functionality, we need our rule to allow us to pick multiple objects. This setting allows us to pick objects on different services and will apply a Hide action on all elements with the same service abbreviation as the objects we have selected.
To finish the rule, the Value field will be completed. Since we are using selection as our input type, the text in the Value field is used in the user prompt when the rule is used.
Lastly, you we will choose your settings in the options section and apply a default action to the rule. Your options are:
- Default Filter Action: This is the default action which forces the user to select what action to apply at the time the rule is activated. If "Default Filter Action" is not selected this will be the action used.
- Select: Select the elements so that you can run any eVolve or Revit command on the selected objects
- Isolate: Isolates the elements in the current view
- Isolate (Temporary): Creates a new temporary view and isolates the elements
- Show: Shows previously hidden elements in the current view
- Hide: Hides the elements from the current view
- Make Halftone: Applies halftone to the selected elements
- Make Transparent: Applies transparency to the selected elements
For this rule, we simply set the default action to "Hide".
The other options to review are:
- Tolerance on decimal values: Defines the decimal precision if your rule is based on a numerical result
- Case sensitive conditions: If your rule is based on a word or partial word match, you can choose if the match needs to be case sensitive.
- Expansion Options:
- Select contained elements within Assemblies and Model Groups. If this option is not selected then the selection filter will only select the Assembly or Group. If the option is selected then it will select the elements within these containers.
- Include part insulation. When selected, both the part and its insulation will be selected.
- Include nested elements. If this option is selected then the filter will select nested elements which contain any parts matching your filter.
To use this rule, activate the rule and select any element(s) which have service abbreviation parameters and all objects in the view with matching service abbreviations will hide when you click "Finish"
Example #2 - Building an Element Filter with User Prompt
In this example, we have created a rule which searches for any fabrication hanger or generic model (upper attachments) elements and it is searching service names based on user input. The default action is set to Select.
This is what it looks like when activated: