Creating sums from each item from multiple sublists

I have selected multiple families all with the same number parameters. I then created sublists of the counts for each family type. How do I work with the lists to create a sum of the 1 item on all the sublists, 2nd item on the sublists, etc.

This is a plumbing calc family and this is the last step for it to be able to add up all the WCs, Lavs, etc.

Here is the Dynamo file and sample Family file:
Plumbing Count Totals.dyn (19.5 KB)
ANO_Code_MPF Assembly A-1.rfa (372 KB)

The end goal will be to export these totals to Excel, then reimport them as a schedule. I’ve done that before on other scripts.

Thanks

You should be able to use list levels so that the parameter values are returned grouped by element. Then you can use list levels again to sum by sublist.

The other option is to transpose your list of values (grouped by parameter) so that they get grouped by element and then sum the same as above.

As a side note, if you’re wanting to do this for all elements of the same family type, it may be easier to get your element totals first and then group by family type name before doing a final sum. It’s not necessary, but it might make the list structures easier to handle.

1 Like

Thanks, after I posted this I started looking into ideas myself and landed on Transpose as well. Thanks for the tips.