Keep Your DWGs Healthy with 3 Simple Steps
We get hundreds of problematic files that come through our tech support center and a ton of emails from clients complaining about slow files, files where dimensions won’t print, and many other strange issues. There are a few simple steps you can take to help keep your files running clean and fast which we will get into below.
What is a DWG?
Let’s first understand what exactly a DWG is; in short, it is a database. Wikipedia defines a DWG as “a proprietary binary file format used for storing two- and three- dimensional design data and metadata”.
What happens to DWGs over time?
As you can imagine, opening, saving, and editing over time can create undesired issues or corruptions in a database. Throw in program-specific objects (that come from object enablers) and the fact that DWGs can be created by a programs other than just AutoCAD, and you have a recipe for undesired performance issues and corruptions. Let’s not forget that files exported from Microstation, Revit, etc. can also bloat the files with data that can cause corruptions. These program-specific objects are saved in the DWG database—no matter what CAD software you use to open it—and build up over time. These are known in AutoCAD as REGAPPS, or Registered Applications, that embed data into the DWG so the file can use certain commands in a particular program.
This buildup of REGAPPS can cause corruptions, which can make your files run slowly, cause objects or commands to not work as expected, or, even worse, cause your files to crash or not even open! Many of these issues can be avoided with some simple cleaning techniques.
Let’s take a minute here and talk about xrefs and files that you receive from outside your company. You have no idea what has been done to these files; what other programs have been used to open, edit and save them; or what REGAPPS or objects have been embedded into the DWG.
Now, take this file and xref it into another drawing. You have just added everything from that drawing into that new file. Don’t believe me? Try using the -Purge → REGAPPS command on the file with the xrefs. Purge them, save, close, and then reopen the DWG. Those REGAPPS will be back if they are in the xreffed file.
Think of it like using the bathroom: would you wash your hands, or just keep walking past that sink? If you don’t wash your hands now, everything you touch the rest of the day will be contaminated! As my colleague KaDe King likes to say, these files can have bathroom hands.
How to Clean Your Files
When you receive a file from someone else, you should perform these three commands on every drawing you receive before you xref it into your files.
Step 1: WBLOCK the Entire File
This is the best way to ensure that you’re only adding the data you need. This is the number one way to really purge unused layers, blocks, REGAPPS, and any other funky junk that someone has done to that drawing. It will even remove bad settings that a user has changed! The Entire File option will take drawing layouts with it, which is great if you have a corrupt Sheet file.
For example, I had a client that had a drawing file that they kept their blocks in. Over time, people have copied and pasted various blocks and details from other DWG files and brought all the contaminants over to that file. They were complaining that it was taking more than 3 minutes to open, and the size of the file was about 15MB. I sat down at his desk and ran the WBLOCK Entire Drawing. The file size dropped to 10KB and opened in about 10 seconds!
Step 2: -PURGE
When using this command, make sure to include the dash before the command. This command has other options that are not in the regular PURGE command dialog box, such as REGAPPS, Zero-length geometry, Empty Text Objects and Orphaned Data.
Tip 1: The “Orphaned Data” will purge DGN Linestyles that come from Microstation and can really bloat a file.
Tip 2: Don’t be fooled by the “ALL” option—it does not run the REGAPPS option.
Step 3: OVERKILL
Have you ever received a file that feels like a monkey drafted it? You might see things like lines on top of lines, things not being connected, or gaps between lines that should be connected. OVERKILL will help clean all these things up.
Following these simple steps will decrease your file sizes, speed up their performance, and keep you from having issues in the future. For more helpful suggestions, download our Guardians’ Guide to Warp Speed AutoCAD and Civil 3D Performance below and check out the Infrastructure Universe monthly newsletter.