
I received an email from blog reader Steve Roberts with a suggested tip topic on how to reduce the size and clean up DWG drawing files using four AutoCAD commands. I wrote a quick blog post in the topic.
It’s going to become Summer for many of us around the world so those bloated and unhealthy DWG files don’t look very good on the beach, and certainly not on your hard drive. What do you do?
There are a few commands you can use to get rid of the file bloating references. Be careful you are not removing things you actually need at some point like an unreferenced dimension style or block.
To clean up drawings, reduce file size and making the the files more healthy use these AutoCAD commands.
AUDIT
This command will examine the drawing file and find errors and allow you to fix them.
PURGE
This command will allow you to purge any unused styles, blocks etc. Be careful you don’t actually need them later or a coworker does. When in doubt don’t purge it out.
-PURGE
This is the command line only version of the PURGE command and used in customized Lisp and scripts.
OVERKILL
This awesome and aptly named command looks for things like duplicated lines on top of lines and removes them.
There is a -OVERKILL as well to be used in Lisp and scripts.
If you have a tutorial on an Autodesk product they want to be posted to this blog and read by thousands of readers, please email me.
Cheers,
Shaan




Before any of these commands were in AutoCAD the best way deal with fluff was to WBLOCK the drawing onto itself. When working with 3D models you had to make sure you made the World Coordinate system was set current or whatever UCS you were in would end up being your new WCS.
Since Wblocking only takes what is being used it was the perfect purger at the time.
(Defun C:CLEANUP()
(SETQ A(GETVAR “DWGNAME”))
(COMMAND “ZOOM” “E”)
(COMMAND “WBLOCK” A “Y” “*”))
Agree!
I still use WBLOCK a lot. Sometimes this is the only way to clean and flatten drawing.
Yes WBLOCK is another great DWG diet technique.
Thank you!
-Shaan
Thank your for sharing. Actually, I don’t know “overkill” command, now I know. 🙂
Actually, to remove some linetypes and text styles that are not used and, I believe, come from other software after exporting the models, I first save the drawing as *.dxf and run audit and purge in a dxf file. You have to close and reopen the file after “save as” command”. Best of luck!
Shaan,
The -PURGE command allows a ‘Regapps’ option. Is it recommend to do this when you are running AutoCAD MEP? Is there any potential danger?
Yes, the PURGE command has the REGAPPS option. In most cases that should be safe to use as it is for a specific regapp issue. When purging anything from your drawing, you really should understand what you are purging and the implications by perhaps testing etc.