Organize flat list of Revit Elements into sublists based on parameter value

Hi,

I am referencing all of the curtain wall panels in my revit scene into my dynamo graph. Unfortunately, the panels come into dynamo in one flat list instead of being organized according to their parent curtain wall (not sure why this is the case). I need all of the panels associated with each separate curtain wall to be in their own sublist.

I am trying to sort them based on their unique Host Id values, but haven’t figured out yet how to work the ‘List.GroupByKey’ node.

Also, am interested if there is a simpler way to organize this list.

Thank you in advance. sortByKeys.dyn (26.4 KB)

You could try using the node similar to this. An oldie but a goody. :wink:

EDIT:

Here is a basic example of Mirror families hosted to walls. I have randomized the input list and you can see how the Group.ByKey node is grouping by the specified parameter, Element Id. :wink:

2 Likes

Thanks, I tried that node, but in my application, it only works if I use 'Clockwork’s ‘Element.Host+’ node with the native GroupByKey node.

Furthermore, Clockwork also has ‘Elements.GroupByHost’ which solves all of the issues with one node.

Clockwork seems to solve everything. Great package. Still not sure why I can’t bring in an entire curtain panel (mullions and panels) just like I can with windows. Seems like that would make sense

.

Thanks again for your help!

1 Like