Tuesday, June 07, 2005

AutoCAD Layer Filters

This applies to any Autodesk product. Layer filters were great when they first came out, but like many Autodesk features users got out of control with them. Generally they are deleted individually. When drawings containing layer filters are inserted into other drawings, the layer filters come along as excess baggage. Too many layer filters can cripple you in performance.

Here are some helpful hints on routines to delete these.

Option#1
Simply type APPLOAD at the command line to load it. You'll find it and then type LAYERFILTERSDELETE to run it.

((defun C:LayerFiltersDelete ()
(vl-Load-Com)
(vl-Catch-All-Apply '(lambda ()
(vla-Remove
(vla-GetExtensionDictionary
(vla-Get-Layers
(vla-Get-ActiveDocument
(vlax-Get-Acad-Object)))) "ACAD_LAYERFILTERS")))
(princ "\nAll layer filters have been deleted.")
(princ)
)

Option #2
The AUGI website discusses these and has the code that can be copied. (may not work from here as text may be formatted.)
http://forums.augi.com/showthread.p...highlight=layer
(must be member to read; membership is free)

Option #3
Dotsoft.com always has good, free routines
Layer Filter Delete
When implemented, layer filters were a good idea. However, during normal usage, they tend to add up inside a single drawing. When additional drawings are inserted/referenced, they tend to migrateand add up. Over time hundreds or thousands of filters can end up in a single drawing. This causes the file size to become large,and load time increase, especially when launching the layer dialog.This free tool allows you to delete all filters or only those youselect.LAYERFILTER.ZIP in the Free Stuff section of http://www.dotsoft.com.

In 2005 Autodesk products, there was a problem with Layer Manager opening slowly. There were Service Packs to update this. Be sure you find your specific Service Pack. http://usa.autodesk.com/adsk/servlet/ps/item?id=4494112&linkID=2475323&siteID=123112
http://usa.autodesk.com/adsk/servlet/ps/item?id=4306518&linkID=2476059&siteID=123112

Hope this helps, Brad. (Ooops! Did I say that out loud?) :)

1 comment:

R.K. McSwain said...

For AutoCAD 2006 users, depending on the value of the sysvar LAYERFILTERALERT, layer filters may be automatically deleted upon entering the layer dialog.

Also note the undocumented FILTERS command which allows you to delete all layer filters.