Results 1 to 8 of 8

Thread: Layer Filters...

  1. #1
    Active Member
    Join Date
    2005-05
    Posts
    72
    Login to Give a bone
    0

    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
    Login to Give a bone
    0

    Default Re: Layer Filters...

    See this post

    Hope this helps...

  3. #3
    AUGI Addict madcadder's Avatar
    Join Date
    2000-11
    Location
    Too far from the beach
    Posts
    1,054
    Login to Give a bone
    0

    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
    Login to Give a bone
    0

    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
    72
    Login to Give a bone
    0

    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
    72
    Login to Give a bone
    0

    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
    303
    Login to Give a bone
    0

    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.

  8. #8
    Mod / Salary / SM Wanderer's Avatar
    Join Date
    2001-12
    Location
    St. Louis
    Posts
    5,407
    Login to Give a bone
    0

    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 Stone
    @MistresDorkness

    Archibus, FMS/FMInteract and AutoCAD Expert (I use BricsCAD, Revit, Tandem, and Planon, too)
    Technical Editor
    not all those who wander are lost

Similar Threads

  1. 2010: Can I use layer group filters for layer translation (LAYTRANS)?
    By Besni in forum AutoCAD General
    Replies: 4
    Last Post: 2013-10-04, 06:52 AM
  2. Layer Filters
    By ShelleyR in forum AutoCAD LT - General
    Replies: 4
    Last Post: 2011-10-10, 12:50 PM
  3. layer filters
    By richardronan in forum AutoCAD General
    Replies: 1
    Last Post: 2009-12-10, 03:28 PM
  4. Layer filters - again.
    By jaberwok in forum AutoCAD Tips & Tricks
    Replies: 23
    Last Post: 2008-11-27, 11:32 AM
  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
  •