More efficient filtering?

Hello,

I successfully created a dynamo script that combines the area of doors and windows filtered by a specific parameter. This filtering parameter is called “Building Side”, which allows me to get the total area for each side of the building (example: north, east, west, etc).

However, the way I got there was quite messy and involved using a filtering node for each different value of this parameter.

In this case, I am using the ElementFilter node from the Rhythm package.

Perhaps by using lists, it would be possible to avoid using the filtering node for each different value of this parameter? I wish I could simplify this script.

Link to the full script: https://revitpure.com/s/WDB_Calculate-Wall-Doors-Windows-Area.dyn

Thanks in advance.

Lists should do it. You just have to use list levels to control them properly.

1 Like

Perhaps use a List.GroupByKey node instead, and processed the key values as a set list (as @Nick_Boyts mentioned), before pulling things together into the final report or sorted list.

2 Likes

Hello, just wanted to mention that the node “List.GroupByKey” solved all my issues and allowed me to simplify the script. Thanks!

1 Like

Can you mark Jacob’s post as the Solution above :smiley: ?