Updated: Aug 3, 2019
As defined on DynamoBIM.org, Dynamo is an application that empowers users within a Visual Programming process wherein we connect elements together to define the relationships and the sequences of actions that compose custom algorithms. That's quite a mouthful, but what does that mean?
When I took the beginner's Dynamo Class at Autodesk University last year I found myself mesmerized by some of the computational tasks we were automating in Revit, but I was left wondering how I would apply this new skillset in my day to day design work. During some of the presentations I watched throughout the course of the week at AU, I heard my peers sharing examples of how they leveraged Dynamo to automate redundant tasks and saved countless hours. I returned home inspired and it wasn't long before I was piecing together my own Dynamo scripts.
One of the first tasks I wanted to tackle was project setup. I commonly work on projects exceeding 200,000 square feet mandating construction document sets containing over 100 floor plans. Managing all these sheets and their respective views can be a pretty daunting task especially during project setup. Creating views for each floor, with the appropriate View Template, naming them, adding them to sheets....add nauseum.
One of the great things I love about the AEC industry is that we're a big community, ready and willing to share insight we've learned through our own experiences. While working through the composure of my script, I occasionally got stuck, unsure of how to put a particular to piece together. I found the forum on DynamoBim.org to be invaluable. There you can share snipits of your scripts and find suggestions on what custom nodes to employ. I wouldn't have found success without the help of some of our more seasoned programmers.
So let's get into it, the script I put together takes an Excel spreadsheet that has a list of Sheets and Views with their respective sheet numbers,titles, associated Levels, etc. This spreadsheet is referenced in the script and used to create the views, on the various levels of the project, name them appropriately, apply a view template, create the sheets with their names and numbers filled out, and then finally drop the new views on their appropriate sheets.
The first portion of the script is pretty straight forward, specifying the location of the spreadsheet, which Sheet in the workbook to reference, and a Boolean to tell Dynamo to read the incoming data as strings. This small node set could be duplicated within the script to better organize large sets of views and sheets, perhaps it makes sense to have a Sheet in the workbook for the architectural drawings and another for the HVAC drawings? Below is a view of the sample spreadsheet.
The first two rows are for User reference only and will be dropped out of the dataset when we import into Dynamo. The numbers in Row 1 help us identify which column number contains what in the list that's imported, Row 2 is pretty self explanatory. As you can see below, I'm using a List.DropItems node to drop the first rows of data being imported. While composing a script I'll often use a Watch node to review what data is coming through.
From here we move over to another small group of nodes where we transpose the list and map the various groups of data. Using a code block we parse out the fields and hand their values off to the appropriate nodes. As you can see below, the numerical references I was using in the spreadsheet help me correctly map the data to the appropriate nodes.
The next set of nodes will setup all the views found in the spreadsheet. Carrying the level names through a List.Map we hand them off to the FloorPlanView.ByLevel. Taking the new views from the FloorPlanView.ByLevel we then crop them and name them based on the ViewName list.
Taking another output from the FloorPlanView.ByLevel we pass the new views through a small set of nodes to apply the View Templates. We're just about done with the views, all we need to do at this point is create the sheets and drop the views on them.
Prior to running the script we need have a Sheet Template set up that we can refer to when we create our sheets. A simple sheet with a floor plan view placed on it seems to work pretty well. This Sheet will be referenced in the final set of nodes below.
In this last set of nodes we're leveraging a Sheet.ByNameNumberTitleBlockAndView node that we drop the list of sheets names and numbers into along with the list of views. For the titleblock family we use a Family Types node to select the titleblock for the new sheets. Last and not least we use a Tool.AlignSheetViewsFromTemplateSheet node and use the Sheet Template mentioned earlier.
Running the script will help you get your sheets and views set up in minutes instead of hours, especially on larger projects. The script is not perfect by any means, there are times when the views do not drop exactly where I want them on the sheets, but most of the redundant tasks are cut out. I have shared the Dynamo script and the sample files for you to build your own version with; you can find them here. Because I used the OTB Autodesk sample models for this dataset the referenced templates are pretty sparse and only intended to relay the concept. Use the files at your risk and reward. As you come up with other ways to build on the concept, share your experiences with the rest of the AEC Community and we collectively will grow together.