SIGN UP

10 Steps to Generate Revit Rooms from Excel with Dynamo

automation bim management dynamo Oct 17, 2023

This is the first post in a series of 3 about linking Revit to Excel with Dynamo. Click here to download the entire series in PDF format, along with 2 dynamo scripts.

Here is a video version of this post:

                                                                                       

In this guide, you will learn how to generate a list of rooms from an Excel spreadsheet into Revit. The Revit rooms still have to be manually placed, but the information such as Name, number department and area required have been pre-filled.

This is the Excel spreadsheet created by the project manager.

Here are all the steps you need to automate the process in Revit.

 

 

1- Create Area Required Shared Parameter

First, add a new shared project parameter called Area Required. This should be an area type of parameter assigned to rooms. That will allow you to verify if the minimum area of each room is met.

 

 

2- Import Excel in Dynamo

Open Dynamo, and let’s start scripting. You will need the Clockwork package for this workflow.

First, let’s bring in Excel. Here are the nodes you should use. You need to specify a path. Then, use the Data.ImportExcel node. Specify the sheet, and read the value as strings.

 

 

3- Separate Headers From Data

This script assume that there is a header on the first row, and the rest is data. We use List.FirstItem to get the headers and List.RestOfItems to get the rest. You can see that each sublist contains all information from the rooms.

 

 

4- Get Lists of Single Parameters

Let’s separate the name, number, department and area required into different values. In this case, we know that room number is index 0, and room number is index 1 and so on. Use the node GetItemAtIndex to retrieve specific elements. We get a list of names and a list of numbers.

 

 

5- Create Rooms and Delete Them

Rooms in Revit are odd. They can be deleted, but remain in the database. This is what we want here, since all the information is imported from Excel, but the user will individually place the rooms themselves.

In this case, we use a node from the custom package Clockwork to create this task. It is called Room.UnplacedByNameAndNumber.

 

 

6- Verify the Revit Room Schedule

When you check out the Revit schedule, you should see this. This is good, but we aren’t done. We need the department name and the area required fields.

 

 

7- Get the Department and Required Area

Once again, use the GetItemAtIndex node to get the department and required area values.

 

 

8- Convert Area From String to Number

The Required Area from Excel is currently a string. We need a number, since Revit expects an area value. Use the String.ToNumber node to accomplish this.

 

 

9- Set Area Required and Department Values

The data is now ready, in separate lists. Use the SetParameterByName node to set both these values. Make sure to use the proper parameter name.

These values can be added after the rooms have been created and deleted. Here are the final nodes:

 

 

10- Verify the Revit Schedule

Head back to Revit. Your Revit schedule should look like this.

When you place a Revit room, make sure to pick from the available list of rooms:

Want to download this post in a PDF format, including extra tips and how to schedule + automate scripts? Want a copy of the Dynamo scripts? Download issue #30 of our Pamphlets publication. You will receive all pamphlets.

33 Free PDF Guides About Complex Revit Topics

Pamphlets

Download the entire collection with this link. You will receive the 33 PDFs by email.

 

Recent Posts

BIM & Beyond - Vol. #1 - Fall 2024

D.TO - AI Details for Revit | BIM Pure Live #082

How to Make Great Revit Elevations