Results 1 to 8 of 8

Thread: Layer Filters...

  1. #1
    Active Member
    Join Date
    2005-05
    Posts
    71

    Exclamation Layer Filters...

    Can anybody help me with a way to delete in masses layer filters. We are using Acad 2002 and evrytime I get a drawing from our civil engineer and other places it has hundreds of layer filters and it makes the file size huge. I fon't have the time to delete them one by one.

  2. #2
    All AUGI, all the time bbapties's Avatar
    Join Date
    2003-12
    Location
    Palm Harbor, FL
    Posts
    537

    Default Re: Layer Filters...

    See this post

    Hope this helps...

  3. #3
    All AUGI, all the time madcadder's Avatar
    Join Date
    2000-11
    Location
    Back in the Bay; Looking for work.
    Posts
    979

    Default Re: Layer Filters...

    Code:
    (defun c:lfd (/ dicts dict filtr)
      (vl-Load-Com)
      (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 (vla-delete filtr)))
      )
    	   )
    	 )
      )
      (princ)
    )

  4. #4
    Active Member
    Join Date
    2005-02
    Posts
    67

    Default Re: Layer Filters...

    I had a similar question the other day and through the responses found the above mentioned routine and it works great.

    I deleted over 19,000 layer filters from some of our drawings. My question is where the heck did they all come from. We don't use any outside sources or any consultant drawings, so how to they get made in the first place??

  5. #5
    Active Member
    Join Date
    2005-05
    Posts
    71

    Default Re: Layer Filters...

    thanks for the link but how do I get it to run?

  6. #6
    Active Member
    Join Date
    2005-05
    Posts
    71

    Talking Re: Layer Filters...

    nevermind i got it thanks for your guys help.

  7. #7
    I could stop if I wanted to LanceMcHatton's Avatar
    Join Date
    2002-04
    Location
    Las Vegas, NV, USA
    Posts
    287

    Default Re: Layer Filters...

    Quote Originally Posted by tflaherty
    I deleted over 19,000 layer filters from some of our drawings. My question is where the heck did they all come from. We don't use any outside sources or any consultant drawings, so how to they get made in the first place??
    Anyone can make a layer filter and it sounds like maybe some of your coworkers have. Also, even though you don't use "outside sources", some of your coworkers may be using drawings they have from other offices they have worked at. Furthermore, old drawings that you might re-use may have filters, too. Every time you insert or xref a drawing, they follow and stick like glue.

    I'd like to offer some advice if I may. I don't know how my lisp compares to the ones in this thread, but I have changed my layer button (on a toolbar) to execute the DeleteLayerFilters lisp and THEN execute the layer command. That way, I never have to think about them or see them. They're just GONE. If everyone in your office does the same thing, you shouldn't have any more filter problems.

    Unless, of course, you actually USE layer filters, then you might be out of luck. Perhaps the lisp can be changed to only delete layer filters that don't have a certain prefix. For example, my company is G.C. Wallace, Inc. Any layer filters we use could have a prefix of GCW<filtername> so the list could delete everything but GCW*. I don't know, just a thought.
    Lance McHatton

    AutoCAD Architecture 2008
    Windows Vista
    I swear, I did not dado that rabbet.

  8. #8
    Certifiable AUGI Addict Wanderer's Avatar
    Join Date
    2001-12
    Location
    St. Louis
    Posts
    4,257

    Talking Re: Layer Filters...

    Quote Originally Posted by LMcHatton
    Unless, of course, you actually USE layer filters, then you might be out of luck. Perhaps the lisp can be changed to only delete layer filters that don't have a certain prefix. For example, my company is G.C. Wallace, Inc. Any layer filters we use could have a prefix of GCW<filtername> so the list could delete everything but GCW*. I don't know, just a thought.
    just as a matter of trivia, this issue was addressed in 2006
    Melanie Perry @MistresDorkness
    Facilities CAD Management (FM - MEP/FP)
    Technical Editor
    Revit MEP 2013 Suite
    not all who wander are lost

Similar Threads

  1. Layer Filters
    By shelley.rutmanis in forum AutoCAD LT - General
    Replies: 4
    Last Post: 2011-10-10, 12:50 PM
  2. layer filters
    By richardronan in forum AutoCAD General
    Replies: 1
    Last Post: 2009-12-10, 02:28 PM
  3. Layer filters - again.
    By jaberwok in forum AutoCAD Tips & Tricks
    Replies: 23
    Last Post: 2008-11-27, 10:32 AM
  4. Layer Filters
    By harry.77503 in forum AutoCAD General
    Replies: 4
    Last Post: 2005-07-27, 04:32 PM
  5. Layer filters, anyone?
    By gbrowne in forum AutoCAD LT - General
    Replies: 1
    Last Post: 2004-07-20, 07:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •