Can we group revit element according to a parameter value?


#1

Hi guys,

I was wondering if there is any custom node to group a list of revit element according to the values of a parameter.

List of elements:
A
B
C
D
E
F

Parameter value:
1
2
1
3
2
1

result:
0- A
C
F
1- B
E
2- D

THANK YOU


#2

yes,

for example you want to group all the doors with same parameter value, in this case “Level”, use the node GroupByFunction

would it help?


#3

That’s exactly what I want thank you


#4

Do we really have to eternally repeat the same things here? :scream: :smile_cat:


#5

What is the way to know the value, which sort the list? is there a simple way?


#6

[&] List.SortByKey or [&] List.GroupByKey from Ampersand do that:


DanEDU has also a node called DanEDU.List.Sort&GroupByKey:

But of course, the OOTB List.GroupByKey node could also work: