Filtering Elements in Revit Using Dynamo and the List.FilterByBoolMask Node

Filtering is necessary when using Dynamo to select elements. For example, if we were looking for all exterior doors in a project, we would use Dynamo to grab all the doors in a project and then filter down the ones that have the type Function parameter set to Exterior. Similarly, you may want to filter out elements that meet a condition.

In the following example, you will report all the reference planes in a Revit project which have not been named.

  1. Create a script that will collect all reference planes in a project. You accomplish this by extracting all reference plane elements from the project.
  2. You then check to see which elements have no name by evaluating which ones are equal to an empty string node. This generates a list of elements that is equal in length to the number of true and false values.
  3. You utilize the List.FilterByBoolMask node to feed it both the list of elements and “mask” of true/false values. Essentially, if the list element matches a true, it will be allowed…

Read more