thanks, R. Bell and J. Mishler

Discussion in 'AutoCAD' started by J C C, May 25, 2004.

  1. J C C

    J C C Guest

    Just a note to say thanks for the routine that deletes all those pesky layer
    filters. Autodesk, please take notice, and add it to Express. This Newsgroup
    rocks!!

    ;;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)
    )
     
    J C C, May 25, 2004
    #1
  2. J C C

    Jeff Mishler Guest

    You're welcome and I'm glad you found it useful! I believe that the code
    needs to be revised for 2005, but I'm pretty sure that Mr. Bell has
    addressed this already.

    And as I finished typing the above I see that Robert has posted a reply with
    the update......

    Jeff
     
    Jeff Mishler, May 26, 2004
    #2
  3. J C C

    Steve Doman Guest

    Yeah! Ditto what J C C wrote!

    <clip>
     
    Steve Doman, May 26, 2004
    #3
  4. I'm working on the AEC's filters. This version takes care of the "vanilla"
    filters.

    --
    R. Robert Bell


    Is this for the Layer Properties Manager Named Layer Filters or the AEC
    Layer Manager's filters??!?
    Forgive me for asking, but I haven't checked it out yet.
     
    R. Robert Bell, May 26, 2004
    #4
  5. J C C

    J C C Guest

    Dear Mr. Bell (any relation to Alexander Graham ...?)

    Just got and installed your updated routine. works like a charm. One drawing
    was relieved of 8883 filters! That's eight thousand and change. Now, this
    layer filter feature will be useful, where before it was next to useless.

    John
     
    J C C, May 26, 2004
    #5
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.