CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Cesky English Deutsch
Login/Register:
 Visitors: 2239 
Plex.Earth connects AutoCAD and Google Earth

CAD tip CAD tip # 9553:

Question CAD 
 %  platform  category 
Q - question

Complete thorough PURGE on a single click.

A - answer Most AutoCAD users probably know the command PURGE for removing unused definitions of blocks, styles, lineptypes, dimension styles, etc. from a DWG file.

If you need to automate purging in your drawings, you can use a simple menu macro (to assign to a button click in your ribbon) or a script. For this, you will use the commandline version of the Purge command, i.e. -PURGE. Remember that not all tables and objects are purged with the option "All", so you will need to separately invoke purging of some special objects (registered applications, zero-length geometry, empty texts). Another special type of object are the DGN linetype definitions - there is a special DGN-hotfix for them (see www.cadstudio.cz/download) with the command DGNPURGE. Due to possible nested objects, it is advisable to repeat the purging process a couple of times.

Then the resulting script for purging really all excessive unused objects and definitions from the current DWG drawing looks like this:

  
_NETLOAD DGNLSPURGE.DLL  
DGNPURGE  
_-PURGE _REGAPP * _N  
_-PURGE _ZERO  
_-PURGE _EMPTY  
_-PURGE _ALL * _N  
DGNPURGE  
_-PURGE _ALL * _N  
DGNPURGE  
_-PURGE _ALL * _N  

Except DGNPURGE, you can perform this purging also in AutoCAD LT. You can also use this script to batch-purge drawings with ScriptPro.

Please note that all these purge commands can be executed - e.g. with a .SCR script - also in the console (non-graphical) version of AutoCAD, AcCoreConsole.exe. See the Tip 8552.

ACADLTADTACADMCivilMapPlant
100% *  CAD 
19.11.2013    3492x  
Comments   Tell a friend

See also:
Tip 9739:Size of a saved DWG file grows unexpectedly.
Tip 9299:What is the xref status "Unreferenced"?
Tip 8788:Batch unification of page setups in DWG files.
Tip 8552:Running AutoCAD without the graphics window (console mode).
Tip 7565:Where from comes the layer $AUDIT-BAD-LAYER ?


Back   All CAD Tips All CAD tips&tricks

VBA not working - failed to initialize. « | » Rendering of 3D models without background in Autodesk Showcase.

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Increase your productivity with our set of BIM add-on functions for Autodesk Revit
CADstudio Revit Tools More info


Please use these tips at your own risk.
CAD Studio (Xanadu) is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist