PDA

View Full Version : Layer Filter Removal



ryanmcin
2004-09-11, 08:49 PM
Hi,

I've got a ton (1,000s) of drawings that I am working with that have 10,000+ layer filters is most of them. I found a lisp a few weeks ago that removes layer filters but it won't erase more that 500 at a time otherwise it exits the command and gives an error message. Does anyone know of a lisp that will clear all of the layer filters??

Thanks.

mjfarrell
2004-09-11, 09:01 PM
I suggest you search the AUGI Exchange
there are a couple of routines there for this
purpose.

Jeff_M
2004-09-11, 09:08 PM
This should do it:


(defun c:layfltrdel (/ lays dicts dict)
(vl-load-com)
(setq lays (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))))
(if (eq (vla-get-hasextensiondictionary lays) :vlax-true)
(vlax-for dict (setq dicts (vla-getextensiondictionary lays))
(if (or (eq (vla-get-name dict) "ACAD_LAYERFILTERS")
(eq (vla-get-name dict) "AcLyDictionary")
)
(vla-remove dicts (vla-get-name dict))
)
)
)
(princ)
)


Jeff

Mike.Perry
2004-09-12, 11:05 AM
Hi

Check out the following thread -

Need Help Deleting "Named Layer Filters" (http://forums.augi.com/showthread.php?t=4342&highlight=delete+layer+filter)

Have a good one, Mike