[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Create a Filter for All Layers Except Xref Layer
Tip# 4359 By Michael Partenheimer On 08-Sep-2014
0
Rated By 0 users
Categories : Layer Tools
Software type : AutoCAD 2015
Rename File To : No Files to download.
This tip includes a handy LISP statement that you can use to easily create a layer filter in any drawing.

I prefer a more elegant way to filter non-xref layers on the Layer Properties Manager palette than selecting xref and the Invert filter checkbox.

Instead, I create a layer property filter. Set the property filter to filter for layer names ~*|*
Note this is a property filter — not a group filter.

The wild cards in the filter return all layer names that do not contain a vertical pipe character. All xref layers contain a vertical pipe character, so they are excluded and the remaining (non-xref) layers are listed.

Here is the LISP code to create this filter automatically:

     (command "-LAYER" "filter" "N" "P" "All" "NAME==\"~*|*\"" "All Non-Xref Layers" "x" "")

Although the standard Invert filter method is certainly viable, I find the non-xref property filter easier to use. I always add it to my project template files.

Notes from Cadalyst tip reviewer R.K. McSwain: This is a useful tip to help manage your AutoCAD layer list. Although this is similar to tip #3154, this tip also includes a handy LISP statement that you can use to easily create this layer filter in any drawing. This may also give you some knowledge to create other useful layer filters.
 

 

Average Rating:
0


User comments
Comment by Maeding,James
Posted on 2014-09-08 13:40:36
good tip! How the heck do I rate it, no link anywhere...
Comment by HEINZ,DOBER
Posted on 2014-09-12 06:02:27
Ich bekomme eine Fehlermeldung auf der Deutschen Version 2015 danke
Comment by Korem,Danny
Posted on 2014-09-23 04:38:37
Great Tip. I created myself something Similar and only then noticed that by the use of Invert Filter I get the same Result!!! at the layer properties manager, select an Xref and you con see only its layers, if you go up yp the built-in XREF filter you can see only the Xref Layers and if you invert you filter You'll be able to see al the non-XREF-layers only.


Log In