So you’re working on a high-rise residential project and you’ve been assigned the task of coordinating all the mechanical systems with your unit layouts. Sounds like fun. Problem is, you’re working under a deadline and need to make changes fast before you issue drawings at the end of the week. You’ve got a killer Revit model but unfortunately, your MEP engineers aren’t working in Revit. Instead, they send you their latest duct layouts in DWG format.
The building is 60 stories tall and each floor plate is slightly different. You can’t link one DWG file and copy it to all the levels. You need to link a unique DWG for each floor level. It takes you about a minute to link one drawing so you’re looking at over an hour just to link all the floor plans. That’s time you’d rather spend getting your work done instead of clicking the mouse and selecting files. Revit doesn’t allow you to link more than one file at a time. So what are you going to do?
Link Multiple DWGs
What you need is some way to automate linking of multiple DWG files into your model. Fortunately, this is easy to do using a Revit macro.
The following Revit macro reads a CSV file containing DWG file paths and Revit views.
In the CSV file, the “File Path” column contains the full paths to the DWG files. The “Floor Plan View” column contains, you guessed it, floor plan views.
The macro first reads the CSV file then it loops through the data and inserts each DWG onto the level of the specified view. The macro checks that each DWG exists in the specified location. If it can’t find the file, Revit will give you a warning. Similarly, the macro checks that each view exists in the current project file. If it can’t find the view, the macro will give you a warning.
The macro links the files using the black and white color mode and places matches the DWG’s origin to the model origin. Insertion units are set to the default value of the model file. All of these settings can be changed by editing the “curOptions” variable in the macro code.
Download the Macro
The macro is written in VB.Net. When you run the macro, you can select the CSV file containing the file paths and the view names. You can also specify if you want to link or insert the DWGS. I highly suggest you link the files but there may be some occasions when you want to import. Keep in mind that importing will greatly increase the file size of your Revit model.
You can download the macro (in Revit 2014 and 2015 formats) from the ArchSmarter Revit Macro Library. To access the library, sign up for ArchSmarter updates in the form below.
Let me know what you think about the macro and leave comment in the box below.