This will delete all named layer filters when loaded.
;; Modified by Chip Harper 09/24/03
;; By R. ROBERT BELL
(defun C:LayerFiltersDelete ()
(vl-Catch-All-Apply '(lambda ()
(prompt "\n***All layer filters have been deleted!***")
What about 14? It came with LMAN, but if I remember correctly, those VLA-*
calls weren't supported yet.
I may be wrong, I'm a bit fuzzy on those "extended" LISP commands. Once upon
a time they were something,
they changed them to something else.....
While I'm at it, if anyone could clear up the history of those commands, say
with a link, I'd also be grateful.
As Jurgen pointed out, with rel. 14 you can create only one layer
filter. You CAN create layer states that are saved to file, but that is
not what this thread was referring to, or at least that's what I thought
So I'm TOTALLY CONFUSED? Sorry. I thought we were talking about a routine to
delete those nasty named layer states that can only be selected one at a
time for deletion. You were talking about filters applying to the layer
And here is a modified version that asks for the names to delete,
wildcards are allowed.
;;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.")
"WHO" <WHO at ? dot com> wrote in message
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.