I do consulting work for other architecture firms. Much of this work involves customizing software or writing BIM and CAD standards documents. Occasionally, I’ll work directly on projects. I like this type of work best as I get to put into action the things I write about here on ArchSmarter.
I was recently tasked with creating some sheets in Revit for a very large multi-building project. Now it wasn’t just a few sheets – it was a lot of sheets. Well over 200 plans and reflected ceiling plans in total. Not only did I have to create the sheets and name and number them, I also needed to create the associated views and add specific scope boxes and view templates to each view.
One of the things I pride myself on as a consultant is that I’ll do what it takes to get the job done. I received this request on a Friday afternoon. “Do you think you can have something for us to look at on Monday morning?” the client asked. “Sure, no problem,” I replied without even thinking twice.
Break Down the Task
So now I had a problem on my hands. How do I get this work done and still have some semblance of a weekend? My first step was to outline the process for creating the views and getting them onto the correct sheets. I would need to repeat these steps five times, once for each of the buildings in the project. Here’s the outline I created:
- Create a plan and ceiling plan view for each floor level
- Link the correct scope box to the view
- Link the correct view template to the view
- Create a sheet for the view
- Rename and renumber the sheet according to the drawing index in Excel
- Add the view to the sheet
- Center the view on the sheet
By my calculations, it would take me about one minute to do all these steps manually. That wouldn’t be too bad if I only had ten or so sheets to do. In my case however, I had five buildings each with over twenty floors for a total of 200 plan and RCP sheets. If done manually, I could finish roughly 45 sheets an hour in which case the whole task would take about five hours.
If you’re like me, the thought of spending five hours doing this kind of tedious work is REALLY unappealing. In all likelihood, it would take me close to six or seven hours because I’d get bored and would probably make some stupid mistakes. Since I would have to get the sheet names from the Excel file, I might misspell a sheet title. Or give it the wrong number. Or I wouldn’t get the view exactly centered. There’s a lot of room for human error in the process.
Revit Macros to the Rescue
So again, how would I get this work done? The answer was to use Revit macros to automate as much of the work as possible. I don’t know about you but I’d much rather spend six hours writing code to do the work rather than spend the six hours actually doing the work. If a task is well-defined and repetitive, like creating views and sheets, it’s a great candidate for automation.
Looking at my outline again, I separated the tasks into two groups – one for creating and setting up the views, the other for creating and setting up the sheets. This lent itself nicely to two macros, CreateViews and CreateSheets.
I spent a few hours roughing out the macros Friday night and did a test run of CreateViews before I went to bed. Saturday morning I went to my son’s little league game then we had a family cookout in the afternoon. I didn’t get back to work until after 8pm. I checked out the views created from last night’s macro, did some tweaks to the code and ran it again. Everything worked out great.
The next task was to fine tune the CreateSheets macro. This macro was a little different since it needed to read an outside file to get the sheet names and numbers. This information was in an Excel file. However, working with a CSV or comma deliminated file is much easier since most programming languages consider it a text file. Rather than write functions to open and read Excel, I just I saved the Excel file to CSV format. In order to ensure the correct sheet displayed the correct view, I added a “view” column to the spreadsheet. This column listed the view that would go on the sheet.
I used a shorter version of the CSV file to test the macro. Once it successfully created all ten sheets, I ran it using the full sheet list and went to bed. Sunday was another full day of family activities so I didn’t get to work again until after 8pm. I reviewed the sheets created the night before and made some tweaks to CreateSheets. I wanted the views to be centered on the sheet so after some Googling (thanks Building Coder), I had some working code that did just that. A couple hours later, everything looked go so I ran the macro and went to bed.
I printed a set of PDFs first thing Monday morning and sent them off to the client. All told, I spent about nine hours on the macros, three hours on Friday, Saturday and Sunday evenings. This was about three hours more than the six it would have taken me if I did it manually.
Run and Repeat
Later that day I received a call from the client. “The sheets look great. However. . .” I held my breath and waited. “Do you think you could redo them with a different orientation? We’d like the plans rotated to Project North”. I exhaled and smiled knowing I’d only need to change one line of code. So rather than spending another six hours redoing the sheets, I just changed the code and re-ran the macros. All told, it took me less than an hour to recreate all 200 plus sheets.
Doing the math, I had saved a total of two hours at this point. Over the following month, I ran the macros three more times, saving an additional eighteen hours. All told, my original investment of nine hours has saved me over twenty hours. This number will only grow as I continue to use the macros over time. And this is just one simple task. As you start to build a library of macros that automate repetitive tasks, you free up a lot of time to do the more interesting, higher value work.
Get the Macro
You can download the macros (in Revit 2014 and 2015 formats) from the ArchSmarter Revit Macro library. Don’t have access? Sign up for ArchSmarter updates in the form below and get immediate access to this and other time-saving Revit macros!
Have you written any Revit macros to automate your work? If so, what tasks have you automated and how much time do you think you’ve saved? Leave a comment below. Also, if you’d like more information on getting started with Revit macros, you can find a list of great resources on my Revit Macro Resources page.