Do you have an AutoCAD drawing that you need to convert to Revit? Wish you could just convert lines to walls in Revit?
This macro makes the process a lot easier by automatically converting model lines to Revit walls.
One of the first things I wanted to learn when I started writing Revit macros was how to create Revit objects, like walls, doors and windows. After some trial and error, I managed to write a macro that prompted you to select a model line then inserted a wall on top of that line. It was pretty simple but I managed to get it to work, which was a major accomplishment at the time.
Fast forward a couple of years later. I decided to revisit this macro to see if I could make it more useful. This time around, I added a nifty dialog box so you can select the line style you want to create the walls from, the starting floor level of the walls, the wall type to use and the wall height.
A couple of things to know about the macro:
- The macro can use any model line to create the walls EXCEPT ellipses, partial ellipses and splines.
- If you insert an AutoCAD drawing, you’ll need to explode it before you can convert the lines to walls. I’m looking into methods for creating walls from linked files. This would be my preferred method. I’m not a big fan of inserting DWG files into Revit models as it adds all sorts of junk to the file.
- The walls are centered on the model line. The location line of the wall is set to “Wall Centerline”.
Some future enhancements will include the ability to set the wall’s top constraint instead using an unconnected height and allowing you to specify the wall’s location line. I’m also looking into using a similar method to create MEP ducts and pipes from 2D lines.
Download the macro
You can download the macro (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.