Wednesday
AutoCAD 2007, Autocad, Hints & Tips, LayerCAD Management: Layer Property Filters in AutoCAD
If you have this much of layers in your drawings, it is very difficult to choose the one that we will work on it among them. For this reason, AutoCAD has introduced property filters in layers window.
However, as usual I will assume that you have paid attention in naming layers while you work with them. In this list, you can see the layers created by a software that is prepared by our company. Prefix assigned to our company by AutoDESK is ‘TAL_’. So that’s why we are starting all the names of layers that we use in our programs with ‘TAL_’. By doing this, we are eliminating all the possible naming coincidences with layers that may be created by other software or the user. After the prefix, there is “2D/3D” part which shows that whether the layer belongs to a 2D or 3D drawing entity. The remaining part shows which module the layer is related to. Due to the fact that we have also assigned render material to layers, they start with ‘TAL_3D_RENDER_’. After explaining about our layer naming system shortly, let’s move on to the filter management window. First of all, I would like to remind you that the window shown in Fig. 1 is activated by LAYER command. The list that is on the left half of this window is reserved for filters. Let’s quickly create a new filter.

Fig. 2 – New property filter command.
By the help of button, seen in Fig. 2, let’s create our first layer property filter. As soon as we press this button, a new window shown in Fig. 3 will open up.

Fig.3 – Layer property filter definition window.
Each filter shall have a name. As we will list 2D layers in our first filter, I am selecting its name as ‘2D’ also. You can filter all of the layers according to all of their properties. In this context, due to the fact that we are only dealing with the name, we write ‘TAL_2D_*’ in the cell under ‘Name’. ‘*’ character is used as joker character in AutoCAD and means everything. In this case, we can see all of the layers starting with TAL_2D_. Anyway, you will already see only the 2D layers in the ‘Filter Preview’ window as soon as you write it. You have already noticed that, we can put more than one line in the definition of filter. In such cases, there is –AND- logical relationship between the lines, i.e. as if saying “list all the layers having conditions in 1st line and 2nd line”. For now, let’s close this window by saying OK, and prepare another filter similarly for 3D layers. Name of this filter will be ‘3D’ and its filter name will be ‘TAL_3D_*’. Finally, let’s create another one with ‘Render’ name and ‘TAL_3D_RENDER_*’ filter name.

Fig. 4 – While the filters are working.
2
Now, the layer properties manager should look like as shown in Fig. 4. However, when we choose ‘3D’, layers related to render are also listed. This will make our work harder. For this reason, let’s right click on ‘3D’ filter and select ‘Properties…’ and let’s enter the filter definition again. (Fig. 5)

Fig.5 .
By the modification we have done in the filter name, we specified that we want to choose all of the 3D layers that start with TAL_3D_ but just after that does not include –R- letter. When we return back to the layer control window, we will see that we have almost made this list clear. Finally, let me list special characters that are used for name catching:

Table 1 – Joker character list.
Thats all. Hope see you again
Post Tags: CAD Management, Layers
Popular
- Hip tip: Increasing view resolution with VIEWRES system variable
07/03/2009 04:39 am
7 Comments - Sirince – IZMIR
07/02/2009 11:02 am
1 Comment - Visual LISP: Programming user interfaces with OpenDCL
07/01/2009 10:15 pm
10 Comments - 3D Modeling 7: EXTRUDE
06/30/2009 02:14 pm
10 Comments - Ask DailyAutoCAD: Which Notebook to Buy?
06/30/2009 12:17 pm
1 Comment
Featured Articles
- AutoCAD 2009 Update 3 Released
- Speed Up As AutoCAD 2009 Ribbon Menu Helps You!
- MEP Analysis Extension for AutoCAD MEP extended to March 31, 2009
- Recap of AutoCAD-related technologies on Autodesk Labs
- Technology Preview of MEP Analysis Extension extended to 12/31/08
- Autodesk Labs: Forward and Backward utility for AutoCAD
- Nov 30, 2007 : Daily Autocad » Blog Archive » Hint: Use layers when modelling in 3D!
- Apr 17, 2008 : Daily Autocad » Blog Archive » Layers 3
|


Jul 1, 2007
Reply
thank you very much. i now understood how to use layer effectively
Sep 13, 2007
Reply
Dear Sirs,
I am new learner of Autocad. I didn’t understand the command of “EX WALL”. Kindly advice.
TQ
Sep 13, 2007
Reply
Hello Agnes
I did not heard about that command. AutoCAD commands can not have SPACES. So “EX WALL” can not be an AutoCAD command. What’s your AutoCAD version? Is it AutoCAD or Architectural Desktop?
Jan 31, 2008
Reply
Before reading this tutorial when i was opening layer manager of some big projects i noticed filter but i didn’t know its application, thank you very much.
Feb 7, 2008
Reply
thanks for the informative chart, but i have one question,
how can i create a filter that shows all layers that do not have the character strings “ABC” and do not also have “123″ for example
Jun 9, 2008
Reply
Thank U.
But I have a question.
How do I pay a lot of layer names in my plan drawing?
Aug 16, 2008
Reply
Since I installed Windows Vista, I cannot change the layer properties in AutoCAD 2007 with SP2 installed (and not SP1). Is there a fix for this?
Aug 18, 2008
Reply
Hello Ken,
According to AutoDESK, there is no problem with Vista if you installed SP2 on 2007. We’re not using Vista. I cannot reproduce the error. But you can write it to support center. They will help you.
Aug 18, 2008
Reply
Hello Ken,
According to AutoDESK, there is no problem with Vista if you installed SP2 on 2007. We’re not using Vista. I cannot reproduce the error. But you can write it to support center. They will help you.
Aug 25, 2008
Reply
hai,
In xref i switch off the layer but the drawing cannot switch off.how i switch off in xref dwg.
Thanks
Aug 28, 2008
Reply
Hello Jay,
AutoCAD creates new layers for attached XREFS. Naming method is like this : {xreffed dwg file name}|{LAYERNAME} . So you have to make modification on this layers.
Hope this helps
Sep 22, 2008
Reply
hi,
Just want to share to you guys my lisp for checking layers 1 by 1.
; The following program is sample output from the LISP Generator (more info at http://www.LispGen.com).
; The LISP Generator is a full-featured code generator for Autocad’s AuotLISP language.
; Legal notices:
; – This sample program is intended as a demonstration only.
; – The program is available on an ‘as-is’ basis with no warranties, either expressed or implied, of any kind.
; – The program may only be used at the user’s own risk.
; – No license or rights to the code are either given or forfeited.
; Everything that follows is direct and unaltered output from the LISP Generator.
; This program was created on November 22 2006 using the LISP Generator.
; Define the function (the program).
(defun c:CL ( / ENTITY1 LN OLDCE OLDERR OLDTE)
; Save the current value of cmdecho then redefine it.
(setq OLDCE (getvar “cmdecho”))
(setvar “cmdecho” 1)
; Save the current value of texteval then set it to 1
(setq OLDTE (getvar “texteval”))
(setvar “texteval” 1)
; Save the current value of the error handling subroutine then redefine it.
(setq OLDERR *error*)
(defun *error* (errmes)
(princ (strcat “\nExecution of CL halted by the following error: ” ERRMES))
(setvar “cmdecho” OLDCE)
(setq *error* OLDERR)
(prin1)
)
;(setq *error* nil)
; NOTE: to turn error handling off, erase the semicolon in the line above.
; GET a ENTITY from the user and store it in ENTITY1.
(setq ENTITY1 (car (entsel “\nSelect object from which to extract the layer: “)))
; EXTRACT the Layer name from the entity ENTITY1 and store it in LN.
(setq LN (cdr (assoc 8 (entget ENTITY1))))
; Input to AutoCAD’s command line.
(command
“change”
)
(command
(ssget)
“”
“p”
“la”
LN
“”
)
; Reset “cmdecho” to previous value.
(setvar “cmdecho” OLDCE)
; Reset “texteval” to previous value.
(setvar “texteval” OLDTE)
; Reset *error* to previous definition.
(setq *error* OLDERR)
; Exit quietly (no return value.)
(prin1)
)
Sep 22, 2008
Reply
Erhan Bey,
Sadece paylasiminiz icin tesekkur etmek istedim
Oct 25, 2008
Reply
HOW TO CUSTOMIZE TOO BAR
Jan 14, 2009
Reply
JASHIM
You can read the fallowing articles:
Define your own toolbar in AutoCAD
Loading CUI files with AutoLISP
Reagars
Jan 14, 2009
Reply
Your post inspired me to share how I group these filters in our template. I stumbled upon it when 2004 was released (from memory) so will work with any AutoCAD since then.
see:Grouping Layer Property Filters in AutoCAD based applications
http://rcd.typepad.com/rcd/2009/01/grouping-layer-property-filters-in-autocad-based-applications.html
Jun 6, 2009
Reply
Thank you very much, I now understood hou to use layer commands..