Our Friends: Leaflet Printing , Presented by: Talia Cad Software

Sign In

Subscribe

Subscribe to Daily Autocad.


Jan 14
Wednesday
AutoCAD 2007, Autocad, Hints & Tips, Layer
CAD 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
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
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
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
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
Table 1 – Joker character list.

Thats all. Hope see you again :)

Viewed 14,605 times so far... This week: 175 Today: 18 Latest: 4 July 2009, 19:13

Post Tags: ,

19 Responses to “ CAD Management: Layer Property Filters in AutoCAD ”
  1. thank you very much. i now understood how to use layer effectively

  2. Agnes Tsen

    Sep 13, 2007
    Reply

    Dear Sirs,

    I am new learner of Autocad. I didn’t understand the command of “EX WALL”. Kindly advice.

    TQ

  3. 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?

  4. 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.

  5. 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

  6. Thank U.
    But I have a question.
    How do I pay a lot of layer names in my plan drawing?

  7. 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?

  8. 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.

  9. 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.

  10. hai,

    In xref i switch off the layer but the drawing cannot switch off.how i switch off in xref dwg.
    Thanks

  11. 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

  12. daren llamado

    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)
    )

  13. Koray Kaya

    Sep 22, 2008
    Reply

    Erhan Bey,
    Sadece paylasiminiz icin tesekkur etmek istedim

  14. HOW TO CUSTOMIZE TOO BAR

  15. JASHIM

    You can read the fallowing articles:

    Define your own toolbar in AutoCAD
    Loading CUI files with AutoLISP

    Reagars

  16. 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

  17. Thank you very much, I now understood hou to use layer commands..


Post a Comment



All content and source © 2008 Daily Autocad | News Plus wordpress theme brought to you by Zidalgo.