Jump to content

Deleting Layer Filters


Tuns

Recommended Posts

  • Replies 27
  • Created
  • Last Reply

Top Posters In This Topic

  • steven-g

    10

  • Tuns

    8

  • rkmcswain

    5

  • tzframpton

    2

Yes in full AutoCAD. I don't have LT to test this.

 

"[color=red][b]-LAYER[/b][/color]"
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/
LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/
Unlock/stAte/Description/rEconcile]: [color=red][b]filter[/b][/color]
Current layer filter: "All Except Xref"
Enter a layer filter option [New/Set/Rename/Edit/Delete/eXit]: [color=red][b]delete[/b][/color]
Enter layer filter to delete [?]:

User input in red.

Link to comment
Share on other sites

No, those don't work and no I did not type the quotations. I want to know how to delete them all because we have huge files that have a layer filter that we don't need. Thing is, I cannot find the layer filter. It says the name of it is "*unnamed" but when I tell it to delete that layer it says "Layer filter not found." When I try to delete the filter using the FILTER command it says "Cannot delete *unnamed filter list." It has layer filters but I have no idea where or what they are.

Link to comment
Share on other sites

Layer filters.

Try this then, it will kill all layer filters, normal ones anyway, change the extension to .scr and drag it into the Autocad window or use the script command. Try it on a backup file just in case. If you have any wierd things going on with filters it might not work, but it works on normal drawing file, layer filters. It will kill every filter.At the end of the script you need to click OK on the layer dialogue box then accept 2 for the variable prompt.

KillFilter.txt

Link to comment
Share on other sites

Try this then, it will kill all layer filters, normal ones anyway, change the extension to .scr and drag it into the Autocad window or use the script command. Try it on a backup file just in case. If you have any wierd things going on with filters it might not work, but it works on normal drawing file, layer filters. It will kill every filter.At the end of the script you need to click OK on the layer dialogue box then accept 2 for the variable prompt.

 

I will try it tomorrow and I'll get back to you on whether or not it works for me. Thanks a lot as always Steven. :)

 

What kind of sorcery would put my original post before yours. I deleted my other post and put it back behind yours because it bugged me. :|

Link to comment
Share on other sites

It's magic, I wanted to edit the text file but it wouldn't let me. However I could delete my post and start again. So It came back in after yours :shock: but you did the same thing so now all is fair. :)

Link to comment
Share on other sites

I should add an explanation

There is a variable in Autocad called 'layerfilteralert' and if you have more than 100 layerfilters setting this to the value '1' will delete all layer filters when you open the layer manager (no questions asked), the script above sets the variable to 1 creates 101 layer filters with the names "a1" up to "a101" and then opens the layer manager deleting all 101 layer filters plus any existing ones, it then sets the variable back to '2' which is the default. If you happen to have any existing layers called "a1" up to "a101" then the script will fail. It does take a couple of seconds to run.

Link to comment
Share on other sites

The last post in this thread says the command [+Layer] will do it.

It does work here in 2013, but you have to supply the full layer filter name. Using the mnemonic and/or clicking the item in the command line does not work.

It also has the side effect of opening the layer palette (even if LayerDlgMode = 0)

 

;; lisp
;; (vl-cmdf ".+Layer" "All Except XREF")
;;
;; macro
.+Layer;All Except XREF;

Edited by rkmcswain
edit code
Link to comment
Share on other sites

How to delete 100's of layer filters from a drawing when you are using LT and so can't use lisps.

Open the layer filters list,

Pick the first filter name from the drop down list.

Place a weight on the Enter key. (The corner of a ring binder will usually be enough)

Click on the Delete button.

 

Go and make yourself a coffee while all the filters get deleted.

 

Can’t remember where I found this tip, but I bet I’m not the only person grateful for it.

 

 

P.S.

Another way of doing it is to WBLOCK the drawing out.

WBLOCK does not copy the layer filters, but you will need to do both modelspace and paperspace seperately and then copy / paste them back together.

Link to comment
Share on other sites

I should add an explanation

There is a variable in Autocad called 'layerfilteralert' and if you have more than 100 layerfilters setting this to the value '1' will delete all layer filters when you open the layer manager (no questions asked)...

Based on this alone I came up with a clever way of doing it. I will set the LAYERFILTERALERT variable to 1 and keep the LAYER menu open. This way I can run a script to purge them without having to add that long script that deletes all the layers before the actual purge part of the script.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...