Filter lists by name


#1

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)?

2.how can I count how many instances of the filtered group types (see picture)?

Thanks

Arne

140815_groups_qs

 


#2

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

140815_groups_qs_2


#3

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: http://jbdynamo.blogspot.no/2014/08/detail-numbering-callouts-and-dynamo.html


#4

You’re almost there :slight_smile:

2014-08-15_183028


#5

Great! Thanks for the swift response!


#6

Hello,

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…

Thanks


#7

Hi William,

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

FamilySymbol.Name


#8

Thanks David!

Exactly what I wanted.


Filled region type names
#9

David,

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

Thanks,


#10

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

HTH


#11

Hi,

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

 

Thanks


#12

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.

FilterByLevelAndCategory_075