Family Placement Based on Size

Hi Everyone,

I’m working on using Dynamo to place revit files from an excel document. I’ve had success importing all the correct information, and now I’m trying to group items based on their sublist information. Dynamo

Each sublist value from the ‘List.GetItemAtIndex’ node represents the width of each different family. They are grouped in their sublists based on their “department” which was specified in the excel document.

I am able to place them based on their width (x-direction) using the code block ‘Geometry.Point.ByCoordinates’, and am now trying to split them, based on their “department” and array them in the y direction, such that sublist [0] (List.GetItemAtIndex) would have y-value[0] from ‘List.Maximum’, sublist[1] would have y-value[1] and so on.


I have pulled as much information I can from here: A post that is trying to achieve something similar (special thanks to Dimitar Venkov for his Python Script) but keep getting stuck.


Thanks Everyone!!

Hello Edward,

The last step would be to create vectors from your values and use “Point.Add” and “List.Combine” on them. You’ll probably want to perform a similar addition for the Y values as you did for the X values.



That worked perfect! Thank you!


I’m now trying to put that list into the string attached (I believe you helped with this some days ago).



I see that the ‘List.Sublist’ node is combining each item with the following item, but I cant seem to figure out how to do that to a list of lists.

Any Thoughts?


Thanks again, this has been a huge help!

Hi Ed,

You basically need to apply the same actions in each direction. The only difference is that because we’re grouping the items along the X axis, we end up wit a list of sub-lists. By placing a few handy “List.Map” nodes, we can take care of that problem. I’ve tried to break down the process below. Red is our X axis, green is our Y axis and blue is the final step that joins the two.

You can ignore the initial code block because I just use it to generate some random sizes for my “families”(for the sake of simplicity I’m using circles).

Because our Y values are a nice flat list, we don’t really need to bother with any python code and can use the “List.Seed” node to add together each item.

However I can’t for the life of me figure out how to hook up the “List.Seed” node to a nested list and that’s why I resort to python code again. I’ve had to modify it a bit so that it can handle the nested list of X values.



Thanks again for all the help! Python seems like such a valuable tool for this.

Nice to hear, Edward. Do you mind sharing a picture of the final outcome? I’m curious how it ended up looking.