How to sort/group parameters in a list


Hi all,

I’m new to Dynamo and I am trying to size the pipes based on European standards. I managed to create a list to extract the parameters I need and then export this to Excel, however I reached a dead end. The list that I am exporting contains instances of those sections of pipes, which obviously have different lengths. Is there a way to create a list that adds up those lengths of pipes which belong to a specific section and then export this? I would like my exported list to show Section numbers on a column and the total length for that section on a different column.

When designing a water service system, Revit assigns numbers to the sections of the pipe and a unique markCapture 2 to each of those pipe instances (pipe tag in picture attached shows Section 1, marks 12895, 12889 and 12890 and the Lengths in mm).

Thank you.


I’m not sure how you want to identify specific sections. But here is a way to do it with a wall example.




Thank you very much for your reply John. I tried replicating your example, but unfortunately it’s not giving me the result I’m after. You’re my hero for the day because I had no clue about Group Items by Key List, so by using this I get the result I want.

Thanks again.