Place x number of items in wall based on element width, wall length and spacing

I have a list of families with different lengths and I have a spacing between them.
I want to insert these families into walls with a fixed length.
Now I need to calculate how many families that fit in the first wall, then continue in the list and see how many fits in the second wall and so on.
How can I group the element width list into sublists of what fits within the max limit

Is this what you’re after?

1 Like