Selecting an Item from a List

Hi everyone,

I just started learning Dynamo three days ago and I need a help in selecting an item from a list.

I want to select only 0 (the highlighted items) from each list and sum them up.
What is the node that I should use to do it? I’ve been googling it but not a good answer!

thank you very much in advance

List.GetItemAtIndex with level of the list input set to @L2.

Alternaively List.Transpose > List.FirstItem > Math.Sum which will transpose the lists so “a list of all the first items in the sub lists, then a list of all the second items in the sub lists, then a list of all the third items in the sub lists…”, then get the first sub list (all the first items in the original list) then sum the values.

One last option: List.Deconstruct with the list input set to @L2 > List.Flatten > Math.Sum. This method is useful if you’re going to look for the area of the windows/doors in the room as once you’re done summarizing the values.

Thank you for the response!
So how exactly do you achieve
List.GetItemAtIndex with level of the list input set to @L2?

sorry for such a beginner question. thank you for your time.

The second solution with LIST.TRANSPOSE works completely fine but wanted to learn more! thank you once again!

Section 6.3 of the Dynamo primer, about half way down the page, covers List Levels: https://primer.dynamobim.org/06_Designing-with-Lists/6-3_lists-of-lists.html

The whole of the primer is likely worth reviewing in it’s entirely since it sets a solid foundation for you.

The example of how I envisioned it working:

1 Like