Filter lists by name

Iuse many groups in my project, and since I can’t make a schedules that count how many groups instances of a group type in a swift manner, I thought doing it in dynamo.

Two questions:

  1. how can I filter my list by name (see picture)? can I count how many instances of the filtered group types (see picture)?





I think I managed to get a little step further to solve question nr. 1, but not quite there yet


You want to use List.FilterByBooleanMask with the list of true/false as input to mask and the original list into list.

For the second part I would use the List.Count node. Returns an integer of the number of entries in a list.

Some sort of relevant info here:

You’re almost there :slight_smile:


Great! Thanks for the swift response!


How would you do this for Filled Regions? when you try and get “Names” back you would expect solid fill black or diagonal crosshatch etc…what is returned is Filled Region, Mask Region, Detail Filled Region etc…


Hi William,

You need the Name of the Filled Region Type (i.e. the FamilySymbol.Name), not the name of each Filled Region:


Thanks David!

Exactly what I wanted.


I can’t seem to find “Element.Name”, i see that its a custom node, i tired searching Dynamo and Package manager.


My bad.

Element.Type is in the Clockwork package by Andreas Dieckmann, under Clockwork > Revit > Elements > Element > Query

Element.Name is built-in, under Revit > Elements > Element > Query



How do you filter elements by LEVEL and CATEGORY at the same time?



While all elements in your selection would typically belong to category, the same is not necessarily true for their level property. So you would first create a filter that filters out all elements that do not have a level property. You can then query the remaining elements for their category and level and combine the tow resulting lists of booleans with an AND condition. The resulting list of booleans can serve as a filter to retrieve only the objects that meet your criteria.