PDA

View Full Version : Layer filters - again.



jaberwok
2006-02-22, 08:35 PM
I'm currently having to use 2000LT :-( and I just found a way to delete all layer filters.
Open the filters list, press and hold the mouse cursor on the delete button, place a weight on the keyboard Enter/Return key and release the mouse button. Walk away.

Of course, you may already know this.

Wanderer
2006-02-22, 09:03 PM
I'm currently having to use 2000LT :-( and I just found a way to delete all layer filters.
Open the filters list, press and hold the mouse cursor on the delete button, place a weight on the keyboard Enter/Return key and release the mouse button. Walk away.

Of course, you may already know this.I dunno... sounds a little new-fangled and sophisticated for me. ;)

jaberwok
2006-02-22, 09:30 PM
I dunno... sounds a little new-fangled and sophisticated for me. ;)

I think it's called "appropriate technology" :-)

de-co1
2006-02-23, 09:25 AM
I read this somewhere before, but it didn't give a how-to on keeping the button pressed. So, I prefer to use a blob of prestik (blue-Tak / office plasticine) holding a pencil wedged under the bottom edge of my screen... This way it looks like some sort of experiment is taking place...

So when someone asks, "What's that for?"

You say, "It's some sort of experiment taking place!"

They will walk away bewildered, because architectural practices don't have pencils anymore.

:lol:

Only problem with this, is that our drawings are so full of layer filters (in the thousands) that it took about 40 minutes to delete them from one drawing. It also reduces the files sizes here by about 85%...!

I went as far as suggesting they have someone come in with a full package and site and clean them all up with the layer filters delete option in later versions of ACAD!

jaberwok
2006-02-27, 07:58 PM
I read this somewhere before, but it didn't give a how-to on keeping the button pressed. So, I prefer to use a blob of prestik (blue-Tak / office plasticine) holding a pencil wedged under the bottom edge of my screen... This way it looks like some sort of experiment is taking place...

So when someone asks, "What's that for?"

You say, "It's some sort of experiment taking place!"

They will walk away bewildered, because architectural practices don't have pencils anymore.

:lol:

Only problem with this, is that our drawings are so full of layer filters (in the thousands) that it took about 40 minutes to delete them from one drawing. It also reduces the files sizes here by about 85%...!

I went as far as suggesting they have someone come in with a full package and site and clean them all up with the layer filters delete option in later versions of ACAD!


I only got to this stage after spending literally (and I do mean to use "literally" literally) hours deleting filters - with names in at least five languages(!). The answer in my case was an M20 nut and bolt. I also suggested I could take the file home and use A2006 to do it. Not allowed.

rad.77676
2006-02-27, 08:14 PM
Try this:
Written by: R. Robert Bell



(defun C:Lyrdel ()
(vl-load-com)
(vl-Catch-All-Apply
'(lambda ()
(vla-Remove
(vla-GetExtensionDictionary
(vla-Get-Layers
(vla-Get-ActiveDocument
(vlax-Get-Acad-Object))))
"ACAD_LAYERFILTERS")))
(princ "\nAll layer filters have been deleted.")
(princ))

jaberwok
2006-02-27, 08:37 PM
Thank you but unfortunately, "I'm currently having to use 2000LT....."

de-co1
2006-02-28, 09:24 AM
... I also suggested I could take the file home and use A2006 to do it. Not allowed.

That's ridiculous. I don't know about you, but when I delete these filters, my file sizes change from 3mB plus, to usually anywhere between 400K and 1.2mB... If only they realised how this affects the life span of their hard drives, whether on the server or individual PCs, with the extra strain placed on writing extra information, how, in slower server environments, accessing info is slower, and when using slow PCs, working on that info is slower...

kastmiler
2006-03-01, 12:16 AM
Since you were brave enough to admit how you did it. I'll fess up to my little secret. I used an eraser on edge with a stapler angled over the keyboard. The weight of the stapler was enough to keep the enter key depressed under the eraser.

How resourceful we humans are.

Thanks for sharing.

jacep
2006-03-13, 06:37 AM
I had problems with some of my consultants. They would send me files that were averaging 6mb. after I ran the following, their drawings would be around 600k.

Here is the lisp I use to clean up all the layer filters:

Delete layer filters *

;;; *
;;; Deleting named layer filters is achieved by deleting *
;;; the single XRecords in dictionary "ACAD_LAYERFILTERS" *
;;; If a layer filter is currently in effect the filter is *
;;; deleted but is visible in the Layer Dialog until one of *
;;; the 3 built-in filters is chosen. *
;;; The built-in filters cannot be deleted. *
(vl-load-com)
(defun C:Delfilters (/ cmd activeDoc xDictLayers
flag xtype xvalue layfilters
count tmp tmpName ask
)
(setq activeDoc (vla-get-ActiveDocument (vlax-get-acad-object))
xDictLayers (vla-getExtensionDictionary (vla-get-Layers activeDoc))
cmd (getvar "CMDECHO")
)
(setq flag nil)
(setvar "CMDECHO" 0)
(if (/= (vla-get-count xDictLayers) 0)
(progn (setq layfilters (vla-item xDictLayers "ACAD_LAYERFILTERS"))
(setq count (vlax-get-property layfilters 'Count))
)
(setq count 0)
)
(command "UNDO" "Begin")
(if (= count 0)
(princ "\nDrawing contains no named layer filters")
(progn
(prompt (strcat "\n" (itoa count) " layer filters found"))
(initget "Keep Continue")
(setq ask (getkword "\nKeep filters by name? Keep/<Continue>: "))
(cond ((= ask "Keep")
(setq pattern (getstring "Name pattern or <*>: "))
(if (= pattern "")
(setq pattern "*")
)
)
(T (setq pattern "Nothing is impossible!"))
)
(repeat count
(setq tmp (vla-item layfilters (- count 1)))
(setq tmpName (vlax-get-property tmp 'Name))
(if (not (wcmatch tmpname pattern))
(if (not flag)
(progn
(initget "Yes No All")
(setq ask (getkword
(strcat "\nDelete layer filter "
tmpName
"? Yes/<No> or All: "
)
)
)
(cond ((= ask "Yes")
(vla-delete tmp)
(princ (strcat "\nFilter " tmpName " deleted"))
)
((= ask "All")
(vla-delete tmp)
(princ (strcat "\nFilter " tmpName " deleted"))
(setq flag T)
)
)
)
(progn (vla-delete tmp)
(princ (strcat "\nFilter " tmpName " deleted"))
)
)
)
(setq count (1- count))
)
)
)
(command "UNDO" "End")
(setvar "CMDECHO" cmd)
(princ)
)I run the lisp within the following macro:

^C^C_AUDIT;Y;_DELFILTERS;;ALL;-purge;_all;*;_n;;_all;*;_n;;_all;*;_n;;_all;*;_n;;_all;*;_n;isavepercent;0;_qsave;

It will clean out any drawing.

Jace Paddleford

[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]

Gail.Jewell
2006-03-13, 06:39 PM
I had to use this when I worked at TJX Corp since their Department Manager wouldn't allow me to 'change' anything in their drawings. Believe that?

Cobo
2006-03-17, 05:40 PM
So I'm not the only one this irritated. We used to get drawings from consultants with over 15,000 layer filters. I used a scale balanced on a tissue box and a yellow highlighter. Many trips were made to the coffee machine and water cooler. I was really glad to get 2005.

n3xutl
2007-11-16, 07:24 PM
2005 LT doesn't have a delete filters button.

jaberwok
2007-11-17, 12:40 AM
Cobo must have been upgrading from LT to full acad.

cdsuggs
2008-10-01, 05:08 PM
You can Shift+select them from the Layer Properties Manager dialog and hit Delete.

This is great but what if you want this to happen in a Lisp or Script?

The code posted in this thread doesn't work for me on 2007 and newer.

cdsuggs
2008-10-01, 05:19 PM
This is great but what if you want this to happen in a Lisp or Script?





thank you Jimmy Bergmark!

http://blog.jtbworld.com/2005/03/delete-autocad-layer-filters.html

buzz
2008-10-01, 06:13 PM
Just saw on Lynn's Blog a new (hidden) command that works in 2008 and 2009 (not sure if it works in other versions). Try it out and see: FILTERS (don't forget the S)

-Buzz

cdsuggs
2008-10-01, 06:23 PM
Just saw on Lynn's Blog a new (hidden) command that works in 2008 and 2009 (not sure if it works in other versions). Try it out and see: FILTERS (don't forget the S)

-Buzz


Good one, any word about a command line version?

tedg
2008-10-01, 06:35 PM
Just saw on Lynn's Blog a new (hidden) command that works in 2008 and 2009 (not sure if it works in other versions). Try it out and see: FILTERS (don't forget the S)

-Buzz
Nice!
It works in 2006 too.

I don't use layer filters but if I did, that would be sweet.

jaberwok
2008-10-01, 07:11 PM
Good one, any word about a command line version?

-filters doesn't work :-(

Gigliano70
2008-10-01, 11:16 PM
nice! FILTERS works in 2007..

jaberwok
2008-10-02, 12:24 PM
nice! FILTERS works in 2007..

but not in LT2006.

mrakarees
2008-11-26, 10:19 PM
Cant you just type filters at the command line in 2000?

jaberwok
2008-11-27, 11:32 AM
Cant you just type filters at the command line in 2000?

Possibly in 2000 but not in LT earlier that 2007LT.