Layer Filters are stored in the drawing. Any time you copy an object
from a drawing with these filters to another drawing, the object will
bring those filters along for the ride. Ditto if you insert a drawing
with filters into a new drawing.
To remove ALL layer filters you can use this lisp routine by R. Robert
(defun C:LayerFiltersDelete ()
(princ "\nAll layer filters have been deleted.")
(defun C:LFD () (C:LayerFiltersDelete))
usage: type "LFD" at the command prompt
OR, if you have your own filters you'd like to keep.....create them with
a unique prefix that you can then use in this lisp:
;;Original code to delete all layer filters by R. Robert Bell.
;;Heavily modified to delete only specific filters by
;;Jeff Mishler, December 2003
(defun c:filtrdel (/ names dicts)
(princ "\nRoutine to delete all but the specified Layer filters. When
names to retain, wildcards are allowed. i.e., entering \"zz*,xx*\"
delete all filters except those beginning with zz and xx.")
(setq names (getstring "\nEnter filter names to retain, press Enter
for none: "))
(setq dicts (vla-GetExtensionDictionary
(vlax-for dict dicts
(if (and (= (vla-get-name dict) "ACAD_LAYERFILTERS")
(> (vla-get-count dict) 0))
(vlax-for filtr dict
(if (not (wcmatch (vla-get-name filtr) names))
(princ "\nSpecified layer filters have been deleted.")
usage: type "filtrdel" at the command prompt
To keep them from coming back, delete them from all drawings and then
make sure to check drawings from outside sources prior to using them in
Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.