named layer manager

Hello everyone, Is there anyone out there that has a lisp routine on how to delete all named layer groups under layer manager AutoCAD 2000i
thanks DCF
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
This will delete all named layer filters when loaded.
;; Modified by Chip Harper 09/24/03 ;; ;; By R. ROBERT BELL ;; (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"))) (prompt "\n...") (prompt "\n***All layer filters have been deleted!***") (princ) ) (C:LayerFiltersDelete) (princ)

named
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Has anyone got something like this WITHOUT all the VLA-* calls? (IE something that'll work on older versions)
"WHO" <WHO at ? dot com> wrote in message

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
which older versions? AFAIK, versions that can't use vla-* don't have the named layer filters either.....
Jeff

all
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Michael, 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 ;-)
Jeff

delete
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
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 dialogues?

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
In "older versions" you will not find any layer filters ;-)
Juergen
Michael Bulatovich schrieb:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
[ See response to Jeff ]

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
In Rel. 14 you can create only ONE Layer filter at one time... Or I'm missing something?
Juergen
Michael Bulatovich schrieb:

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
No, Jurgen. Ithink I was missing something: the whole point of the thread. See response to Jeff.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
And here is a modified version that asks for the names to delete, wildcards are allowed.
Jeff
;;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) (vl-Load-Com) (princ "\nRoutine to delete all but the specified Layer filters. When entering filter names to retain, wildcards are allowed. i.e., entering \"zz*,xx*\" will delete all filters except those beginning with zz and xx.") (setq names (getstring "\nEnter filter names to retain, press Enter for none: ")) (vl-Catch-All-Apply '(lambda () (setq dicts (vla-GetExtensionDictionary (vla-Get-Layers (vla-Get-ActiveDocument (vlax-Get-Acad-Object) ) ) ) ) (vlax-for dict dicts (if (and (= (vla-get-name dict) "ACAD_LAYERFILTERS") (> (vla-get-count dict) 0)) (progn (vlax-for filtr dict (if (not (wcmatch (vla-get-name filtr) names)) (vla-delete filtr) ) ) ) ) ) ) ) (princ "\nSpecified layer filters have been deleted.") (princ) )
"WHO" <WHO at ? dot com> wrote in message

all
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

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.