<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=445056146107513&amp;ev=PageView&amp;noscript=1">

Hagerman Blog

Dan’s Dynamo Diary: Post 1 – Creating Sheets in Revit from Excel

Posted by Dan Rosenberg on Sep 3, 2019 1:19:25 PM

I am sure by now most of you have heard of Dynamo and hopefully some of you have started using it.  This post is for people that have heard of it, are familiar with what it is, but just haven’t taken the initiative to take it for a spin yet.  If that is you, now is your chance to see what you can do with this amazing tool.  This lesson will be very basic, but will show you how it works.  My hope is that you will see how easy it can be to use and provide just enough of a jump start to get you wanting to learn and use it more.

This lesson will use Dynamo to take an Excel Spreadsheet and create a bunch of sheets inside Revit.  This might seem a little mundane and maybe not even useful or practical for you personally, but it should provoke thoughts of the endless possibilities you can accomplish with Dynamo. 

  1. Install Revit 2020. Dynamo will install with it.   You can probably also use an earlier version, but some clicks might be different.
  2. Download my Excel file or create your own. Mine is very simple and is formatted as shown below:

2019-news-sept-sheets-1

  1. Launch Revit 2020 and start a file from the default Architectural Template
  2. On the Manage Tab, click Dynamo. That will Launch Dynamo in a new window:

2019-news-sept-sheets-2

  1. Under the FILES section, click ‘New’:

2019-news-sept-sheets-3

  1. In the Library Search box type ‘excel.’ Click on the Import Excel Node, and notice the node is added to your graph workspace as shown below: 

2019-news-sept-sheets-5

  1. For the next step, use the same search box to find the ‘File Path’, ‘File From Path’, and ‘String’ Nodes. Arrange them as shown below.  Then click on the Browse button and find wherever you saved the Excel file.  Then type ‘Sheet1’ in the String Node.  (Sheet1 is referencing the tab on my excel file where the information is located)  You also need to click on the arrows to connect the nodes to the inputs as shown:

2019-news-sept-sheets-6

  1. We can leave the readAsStrings and showExcel nodes empty as it will accept the default as True. If you want to set any of these to False, you can use the Boolean node.
  2. Add a Watch Node to verify your data is being pulled in from Excel. If not, revisit the last several steps. 

2019-news-sept-sheets-7

  1. Type ‘Transpose’ in the search box to find the List.Transpose Node. ‘GetItem….’ to find the Get Item at index node.  Type ‘Code’ to find the Code Block Node.  Alternatively, you can double click inside the graph and it will add a Code Block node.  Type the information as shown in the Code Block then Arrange and connect the nodes as shown:
    2019-news-sept-sheets-8
  2. Note that you can click on the part of the Node where it says ‘Auto’ and you will get a dropdown list showing the information being passed along.  In my graph, the List.GetItemAtIndex Node on the top has the sheet names and the one on the bottom has the sheet numbers.  Basically all this step does is separate the main list into two separate lists of Sheet Names and Sheet Numbers.  This is important in the next step. 
  3. We will also need these nodes as well. You can put them directly underneath the Code Block and ListGetItemAtIndex Nodes.  You will also need to select the following items from the drop down menus as shown:

2019-news-sept-sheets-9

  1. Now get the Sheet.ByNameNumberTitleBlockAndView node and connect as shown:

2019-news-sept-sheets-10

  1. Switch over to Revit and verify that your Sheets have been added. You might need to expand the plus sign next to Sheets in the Project Browser:
    2019-news-sept-sheets-11

  2. Save your Dynamo Script, then close Dynamo. You can now save your Revit File and it will maintain the Sheets you added. 

Topics: Tips and Tricks, Dynamo

Back to home