Help with Neste Lists

Hello everyone.

I am new to Dynamo and I am trying to develop a simple script that will sum values based on a parameter of the Revit element.

In this specific case, a list was generated from the values of ‘Mark’ and ‘Volume,’ and I want the script to sum the volume for structural columns with the same ‘Mark’ value.

The problem is that the list has 4 levels, and I need to split the original list into 4 different lists and perform the sum individually.

So, what I want as output in this specific case is to sum all the values at INDEX 1 of level @2 in the original list, without having to split the original list into 4 lists using the GetItemAtIndex node. Because in this particular case, I only have 4 lists at level 4, but most of the time, what I have is 100 lists at level 4.

Thank you very much

List.LastItem set to @@L2 should get all the values you’re after while maintaining the groups.

1 Like

Hello Jacob, I ended up discovering the List.Reduce node to achieve the sum of values.

In fact, i don´t know how to use de double @ with levels. Again, i don`t know much about coding.

Thank you very much for your help any way.