Family Creation using Dynamo – Part 2

After using Dynamo to bring in excel data to create family types for each of the equipment listed, it was time to figure out how to organize how and where the instances of each type would be created in the Revit project space.

The user offered the option to bring in all the equipment at once and locate the pieces in roughly the same area. He wanted equipment separated by rows, designated by room number. I knew this was something I could do with Dynamo, but was unsure if there were nodes that could execute this specific task. I ended up creating a custom node and writing a basic python script.

The script sets the first piece of equipment to have an X,Y location as 0,0. It then runs through the list of equipment and checks to see if the current equipment room number matches the next equipment room number. If it matches, the script adds a small x increment (based on the size of the equipment) so that the equipment is created along a row in the x direction. If the room number does not match, the script starts a new row by adding 50′ in the y direction. This worked pretty well, but I must add that the excel file must be organized by room number (or else you are going to get multiple rows of the same room number if the data isn’t next to each other).

Dynamo then takes this information from the script and uses it set the location of spawn point for each family type instance.

And there you have it! I ran my list of ten pieces of equipment, shown again here:

And this is the Revit result:

As you can see, each family type instance is created, instanced in the right location and with the correct size. The user was ultimately very happy with this script, and used it to add in this generic specialty equipment family into his project.

I do want to add, as a funny note, that the script pretty much became obsolete as soon I began using the Ideate Add-in- this tool has a very similar function to what this dynamo script does. But overall, it was a very fun project and I look forward to working on similar tasks in the future!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s