List Management Manage List Indices

Hi Fellow Dynamo users,

I came across a situation where i need to know the number of cylinders in wall and slab.
Im trying to group them by,

wall type 1
no of cylinders 20

wall type 2
No of cylinders 8

Screen Dump,

ISSUE IS HOW DO I MAKE IT MORE EASY BY REMOVING THE EMPTY LISTS IN BETWEEN AND STILL PRESERVING MY INDICES?

Hard to solve with the data you posted. Use the image export (camera button on the top right corner of the screen) so we have a complete view.

My guess is that you need to sanitize your data before you combine it. I would first Flatten your list of cylinders before you combine it with the list of walls. Make sure lacing is set correctly. Once that is done you should have a list for each wall, some of which may be empty lists. Then use a List.AddItemToEnd to join the data.

These are my 2 lists that I need to group,

I need something like,

Wall1
Cylinder1
Cylinder2

Wall 2
Cylinder1
Cylinder3

basically these are geometry intersections which I want to count per wall.
So in each wall I need to count the intersections.
later by slabs.

Finally I need the count based on Family type.

wall type 1
no of cylinders 3

Slab Type1
no of cylinders 12, etc.

Flatten the lists of cylinders at level 3 - you should get just a list of cylinders per wall, my levels may be off.

List.Count at level 2. That’s the count per wall/slab (assuming your list structure matches - I can’t tell with the smaller section of the graph).

1 Like

It worked, thanks @jacob.small

1 Like