Rev up Your Revit: 5 Methods for Smart Automation

automation Jan 05, 2024

 In the fast-paced AEC industry, automation is a way to increase efficiency and accuracy while spurring innovation. By automating repetitive and time-consuming tasks, Revit users can focus on the more creative aspects of design, ensuring precision and saving time. Moreover, as the industry evolves, staying competitive requires embracing new technologies. Automation in Revit isn't just a convenience; it's becoming a necessity. Professionals who leverage these tools are better positioned to meet client demands, adhere to tight schedules, and deliver superior projects.

 

Benefits to Automation

Automation in Revit brings several benefits. The most obvious is an increase in efficiency. If it takes five clicks to complete a task, but you can reduce it to one click with some automation, you can save some time there. If this is a task you perform multiple times during the day, these little savings add up considerably. 

Another benefit is an increase in accuracy. I don't know about you, but I zone out if I do a task repeatedly. My mind wanders, I start thinking about lunch, and then BAM! A whole bunch of mistakes. With automation, the computer doesn't get bored. It just does its task one after another without distraction. 

A third benefit is the customization that comes with automation. You can tailor a workflow to your specific project needs. Say you need to name your rooms a particular way or output data for the owner using a specific format. Automation can make this much more manageable. 

 

How to Automate Revit

Ok, so you're sold on the benefits of automation. But how do you do it? You can automate tasks in Revit in several ways, depending on your needs and skill set. Here are the five primary methods you can use: 

  1. Dynamo
  2. Custom pyRevit scripts
  3. Python Shell
  4. Revit Macros 
  5. Revit Add-ins

There are similarities between all these methods; for example, they are all built on the Revit API. However, each implementation is quite different. Here's a detailed overview of each method. 

 

1. Dynamo

Dynamo is a visual programming tool that lets users design workflows visually, making it appealing to those who may not be traditional coders. Its user-friendly interface and drag-and-drop functionality make it more accessible than text-based programming. Dynamo uses small encapsulated code objects called "nodes" to create an automation. Users can string together nodes to automate specific tasks. Say you want to get all the doors in your project and change their door mark values, adding a prefix to the existing mark. In Dynamo, this would require a collection of nodes first to get all the doors, then get their mark values, add the prefix to the mark value, and then reset the mark parameter with the new value. You would need about 8 to 10 nodes to accomplish this. 

Dynamo is built into Revit, so no additional software is required. You could fire it up today and get started! Another benefit to Dynamo is its engaged user community. Dynamo users have created numerous "packages," custom libraries of "nodes" that are readily available to download. Likewise, the ArchSmarter Toolbox contains a collection of time-saving Dynamo scripts, which you can download for free.

Key Features and Benefits

  • Visual Programming: Intuitive design for non-programmers.
  • Ease of Use: User-friendly with a shallow learning curve.
  • Versatility: Wide range of applications from data management to geometry creation.

 

2. Custom pyRevit Scripts

pyRevit is a free add-in for Revit. Although it includes many useful pre-built tools, a key feature of pyRevit is that you can add your own custom Python scripts. You can even configure these scripts to be accessible from a custom ribbon in the Revit interface. This capability provides the benefit of having custom scripts accessible from the Revit ribbon without creating a custom ribbon, which requires knowledge of C# and the Revit add-in framework (see Revit Add-ins below).  

Key Features and Benefits

  • Uses Python language: Python is easy for beginner programmers to learn. 
  • Interface framework: Intuitive design for non-programmers.
  • Existing code: Can modify existing pyRevit tools or reuse existing tool code to create new tools.   

 

3. Python Shell

Python Shell is a Revit add-in that provides a direct scripting environment inside Revit. Using Python Shell, you can type Python code directly and have it run against the current model. If you're familiar with the Python language and the Revit API, this provides a fast and easy way to create scripts as you work. Unlike pyRevit, it does not provide easy access to tools and scripts from the ribbon. However, scripts can be saved as .py files and rerun using the Python Shell interface. 

Key Features and Benefits

  • Uses Python language: Like pyRevit, Python Shell uses the Python language, which is relatively easy to learn. 
  • Direct scripting: Write and run code directly in Revit.

 

4. Revit Macros

Generally speaking, macros are small programs that automate repetitive tasks. Revit includes a built-in macro editor called SharpDevelop. Unlike macros in other applications, like MS Word or Excel, you must code Revit macros directly. You cannot record your actions and have them convert to code in the macro editor. You can write macros in various programming languages, including C#, VB.Net, Python, and Ruby. The macro editor is accessible from the Manage ribbon. Macros are saved to an RVT file, so you must open the file in Revit to run its macros. The ArchSmarter Toolbox contains a collection of 20+ Revit macros, which you can download for free. 

Key Features and Benefits

  • Integration: Macros are saved directly in the RVT file. 
  • No Additional Software: Easy to start with minimal setup using Revit's built-in macro editor, SharpDevelop
  • Various languages: Macros can be written using C#, VB.Net, Python, or Ruby. 
  • Can be converted to add-ins: Macros written in C# or VB.Net can be converted to add-ins fairly easily. 

 

5. Revit Add-ins

If you want tools that are powerful yet easy for users to use, look no further. Revit add-ins, like the ArchSmarter SmartPack, are potent tools that extend Revit's functionality and allow you to tailor the software to your specific project requirements or workflow preferences. However, they require more technical knowledge to create. Add-ins are written using C# or VB.Net and need an IDE (Integrated Development Environment) like Visual Studio or Rider to program. Add-in code gets compiled as a .dll file. The .dll file, along with its configuration or .addin file, must get copied to a specific folder so Revit can read it at startup. Revit add-in templates make this process easier, but some knowledge of the add-in framework is required.   

Key Features and Benefits

  • User Experience: Can build sophisticated user interfaces to make the user experience easier and better. 
  • External libraries: Can incorporate external code libraries to add additional capabilities, like reading cloud databases and advanced math capabilities.
  • Lots of code samples: Many code samples and example add-ins are available online. Some good resources include The Building Coder and Boost Your BIM. 

 

Conclusion

These Revit automation methods offer a blend of efficiency, accuracy, and customization, from the simplicity and visual appeal of Dynamo to the sophisticated capabilities of Revit add-ins. The available automation tools cater to various skill sets and project requirements. Embracing these tools elevates your workflows and equips you with the means to address complex challenges with agility and precision.

 

Want more? 

Want to delve deeper into these tools and refine your skills? Explore our range of free training and resources. We offer training on both Dynamo and Revit add-ins. Get started today!

Join ArchSmarter!

Sign up for ArchSmarter updates and get access to the ArchSmarter Toolbox, a collection of time-saving Revit macros, Dynamo scripts, and other resources. Plus you'll get weekly productivity tips, webinar invitations and more! Don't worry, your information will not be shared.

We hate SPAM. We will never sell your information, for any reason.