Purging in Architectural Desktop 2004

Contents:
The Problem ---- Solutions ---- Conclusion

1The Problem
It's like a Snowball

In terms of managing file size in Architectural Desktop, Styles can prove to be like the snow that accumulates on a ball rolling down a hill.  One of the worst offenders are the MvBlocks because they not only bring Multi-View Block Definition Styles but also regular AutoCAD Blocks.  Designers who try many of the Content Objects drag them in, delete them and move on to other objects without realizing how large their drawing might be getting.

Most AutoCAD users know about the Purge command which is great for removing unused and unreferenced Layers, Text Styles, Dimension Styles, Linetypes, Blocks and so on but it does nothing for Architectural Desktop Styles.

2Solutions
Recursive Purging

Before I elaborate on some of the things you can do to Purge data in Architectural Desktop, I have to say that I am rather dismayed that the product does not come with an AecPurge routine.

Since MvBlocks are easy to understand and similar to Blocks, lets begin by focusing on this problem.

To Purge Multi-View Block Definition Styles, you can either use the Style Manager Window or you can use the command line options.  On the command line type "-MvBlockDefine" and notice that there is an option to "Purge".  As with AutoCAD's command line version of the Purge routine, you will find the option to specify the Style Names or use the asterisk ("*") for All.  Since you cannot purge objects that are being used, there is very little risk involved in purging all.  The last question you will need to respond to is whether or not you want to verify each item one-by-one.  Again, since you cannot remove objects being used this is probably not necessary.

Once you have Purged all of the Multi-View Block Definition Styles, the real purging can be done.  You see, all this process did was remove the Styles but since MvBlocks are notorious for using numerous regular Blocks ( referred to as View Blocks ), you won't see much of a file size reduction until you Purge those Blocks.  On the command line type "-Purge" and notice the option for "Blocks". 

Command: -mvblockdefine
Style [New/Copy/Edit/Purge/?]: p
Styles to purge <*>:
Verify each name to be purged? [Yes/No] <Yes>: n

Plug a script into a Tool, Menu Button or .pgp file

To make this process faster and easier to execute, we can write a script file that follows the steps I just outlined.  Because I used a dash as a prefix for each command discussed above, no dialog box was activated and that allows for script writing.  Once you activate a dialog box, scripts drop out of action.  You can plug this script into a toolbar button, Tool Palette tool or any of your other favorite locations like the .pgp file.

-mvblockdefine;p;*;n;;-purge;b;*;n;

Illustrated to the right I show how I took the Fillet tool and copied it to quickly create my own tool for purging MvBlocks and Regular Blocks.  You can Copy a tool by holding the Ctrl key down while dragging the tool icon.  To Modify the copied tool, right-click over it and Select the Propertis option on the Context pop-up menu.  Once on the Tool Properties dialog, pick on the Command dialog icon to activate the Command dialog as illustrated to the right.  Here you can paste the script I listed above.

Creating the Image is another story but if you know how to use Photoshop just make a 64x64 pixel .png file.  If you don't know anything about graphics, you can actually just use AutoCAD to draw your tool icon image and then use the PngOut command to make an image of it.  Under the "Image:" title on the Tool Properties dialog you can right-click to Select "Specify Image..."

3Conclusion
Other things to Purge

There are many other things that can be Purged in ADT but not as easily as what I just demonstrated.  In my observation of file size, MvBlocks tend to be the biggest culprits of file bloating so this is a nice little routine to have around.

For the Display System you can use the "Display" command, specify "P" for Properties and then "P" again for Purge.  You better know what you are doing when purging Display Configurations, Sets and Representations and even if you do, this doesn't affect file size by much.

Object Styles, on the other hand, can definitely bloat file size but as far as I know, you cannot use a typed command to Purge all of the unused Object Styles so you have to use the Style Manager Window.

You can, however, Purge individual Family Styles by specifying the Family Name such as "-DoorStyle", "-WindowStyle", etc. and then use the "P" for Purge option.  This can be added to the script file discussed above but for me, I might as well use the Style Manager Window since I can't use a single command to purge all of them.

© Copyright 2004 ARCHIdigm. All rights reserved.