named layer manager

Discussion in 'AutoCAD' started by Dennis Flandez, Dec 17, 2003.

  1. 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
     
    Dennis Flandez, Dec 17, 2003
    #1
  2. Has anyone got something like this WITHOUT all the VLA-* calls?
    (IE something that'll work on older versions)
     
    Michael Bulatovich, Dec 17, 2003
    #2
  3. Dennis Flandez

    Jeff Mishler Guest

    which older versions? AFAIK, versions that can't use vla-* don't have
    the named layer filters either.....

    Jeff
     
    Jeff Mishler, Dec 18, 2003
    #3
  4. In "older versions" you will not find any layer filters ;-)

    Juergen
     
    Jürgen Palme, Dec 18, 2003
    #4
  5. 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.
     
    Michael Bulatovich, Dec 18, 2003
    #5
  6. [ See response to Jeff ]

     
    Michael Bulatovich, Dec 18, 2003
    #6
  7. In Rel. 14 you can create only ONE Layer filter at one time... Or I'm
    missing something?

    Juergen


     
    Jürgen Palme, Dec 18, 2003
    #7
  8. Dennis Flandez

    Jeff Mishler Guest

    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
     
    Jeff Mishler, Dec 18, 2003
    #8
  9. 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?
     
    Michael Bulatovich, Dec 18, 2003
    #9
  10. No, Jurgen. Ithink I was missing something: the whole point of the thread.
    See response to Jeff.

     
    Michael Bulatovich, Dec 18, 2003
    #10
  11. Dennis Flandez

    Jeff Mishler Guest

    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)
    )
     
    Jeff Mishler, Dec 18, 2003
    #11
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.