PDA

View Full Version : Named Layer Filters


MagicJS
01-25-2005, 07:50 AM
These filters are taking over like viruses. Every architectural drawing I
receive have thousands of them, making files many times larger.
The "Delete All" button takes five minutes on some files. Does anyone know a
fast command or script that can delete them all.

MagicJS

Smiley
01-25-2005, 08:22 AM
MagicJS wrote: These filters are taking over like viruses.

This is an AutoCAD bug... they cannot be deleted and are added to any
drawing that inserts a file with layer filters. Here is a LISP routine
to delete them (sorry don't know the origial source).

;;Routine to delete layer fileters, which are otherwise impossible
;;to remove and will propigate to any drawings where the file is
inserted.
;;Type DLF to start routine.

(defun C:DLF (/ eprLayFilt lstTemp lstFilters enaFilter)
(setq eprLayFilt
(entget
(cdr
(assoc
360
(entget
(cdr
(assoc
360
(entget
(cdr
(assoc 330
(entget (tblobjname "LAYER" "0"))
)
)
)
)
)
)
)
)
)
)
(foreach lstTemp eprLayFilt
(if (= (car lstTemp) 360)
(progn
(princ lstTemp)
(setq lstFilters (append lstFilters (list (cdr lstTemp))))
)
)
)
(if lstFilters
(foreach enaFilter lstFilters (entdel enaFilter))
)
(princ)
(princ "All layer filters have been deleleted")
)

Smiley
01-25-2005, 09:13 AM
MagicJS wrote: These filters are taking over like viruses.

This is an AutoCAD bug... they cannot be deleted and are added to any
drawing that inserts a file with layer filters. Here is a LISP routine
to delete them (sorry don't know the origial source).

;;Routine to delete layer fileters, which are otherwise impossible
;;to remove and will propigate to any drawings where the file is
inserted.
;;Type DLF to start routine.

(defun C:DLF (/ eprLayFilt lstTemp lstFilters enaFilter)
(setq eprLayFilt
(entget
(cdr
(assoc
360
(entget
(cdr
(assoc
360
(entget
(cdr
(assoc 330
(entget (tblobjname "LAYER" "0"))
)
)
)
)
)
)
)
)
)
)
(foreach lstTemp eprLayFilt
(if (= (car lstTemp) 360)
(progn
(princ lstTemp)
(setq lstFilters (append lstFilters (list (cdr lstTemp))))
)
)
)
(if lstFilters
(foreach enaFilter lstFilters (entdel enaFilter))
)
(princ)
(princ "All layer filters have been deleleted")
)

MagicJS
01-25-2005, 11:28 AM
Thanks a lot cadcoke, the script works great.

MagicJS

<cadcoke3@yahoo.com> wrote in message
news:1106670156.377977.226940@c13g2000cwb.googlegroups.com... MagicJS wrote: These filters are taking over like viruses. This is an AutoCAD bug... they cannot be deleted and are added to any drawing that inserts a file with layer filters. Here is a LISP routine to delete them (sorry don't know the origial source). ;;Routine to delete layer fileters, which are otherwise impossible ;;to remove and will propigate to any drawings where the file is inserted. ;;Type DLF to start routine. (defun C:DLF (/ eprLayFilt lstTemp lstFilters enaFilter) (setq eprLayFilt (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget (cdr (assoc 330 (entget (tblobjname "LAYER" "0")) ) ) ) ) ) ) ) ) ) ) (foreach lstTemp eprLayFilt (if (= (car lstTemp) 360) (progn (princ lstTemp) (setq lstFilters (append lstFilters (list (cdr lstTemp)))) ) ) ) (if lstFilters (foreach enaFilter lstFilters (entdel enaFilter)) ) (princ) (princ "All layer filters have been deleleted") )

R.K. McSwain
01-25-2005, 04:02 PM
On 1/25/2005 10:22 AM cadcoke3@yahoo.com wrote: This is an AutoCAD bug... they cannot be deleted and are added to any drawing that inserts a file with layer filters. Here is a LISP routine to delete them (sorry don't know the origial source).

You say they can't be deleted, then supply a routine to delete them....

One of, if not the original author is R. Robert Bell

BTW, named layer filters are not propogated starting with R2005.


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service