Named Layer Filters
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Named Layer Filters

 
Post new topic   Reply to topic    CADForums.net Forum Index -> AutoCAD
Author Message
MagicJS
Guest





Posted: Tue Jan 25, 2005 8:50 pm    Post subject: Named Layer Filters Reply with quote

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

Back to top
Guest






Posted: Tue Jan 25, 2005 9:22 pm    Post subject: Re: Named Layer Filters Reply with quote

MagicJS wrote:
Quote:
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")
)
Back to top
Guest






Posted: Tue Jan 25, 2005 10:13 pm    Post subject: Re: Named Layer Filters Reply with quote

MagicJS wrote:
Quote:
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")
)

Back to top
MagicJS
Guest





Posted: Wed Jan 26, 2005 12:28 am    Post subject: Re: Named Layer Filters Reply with quote

Thanks a lot cadcoke, the script works great.

MagicJS

<cadcoke3@yahoo.com> wrote in message
news:1106670156.377977.226940@c13g2000cwb.googlegroups.com...
Quote:
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")
)
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> AutoCAD All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB