• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Using Layer Filters

As discussed previously, organizing objects into groups using layer names is very useful. But although it’s good to use layer names to organize your drawing, if the layers become too numerous, their usefulness degrades. The usefulness of layers degrades because too many layers makes it cumbersome to use the Layer Properties Manager to locate the specific layer whose properties you need to edit, or whose behavior you need to change. The more layers a drawing has, the more their usefulness degrades.

More than likely, you will work on drawings that contain dozens, hundreds, or even thousands of layers. This is especially true when you attach xrefs to the current drawing, adding to its list of layers the layer lists of each xref. Therefore, the likelihood that you will be presented with the challenge of working with too many layers is very high.

Fortunately, AutoCAD’s Layer Properties Manager provides a feature called Layer Filters that allows you to control which layer names display by defining certain parameters. By using Layer Filters, you can realize the benefit of organizing your drawing with layers, and not be overwhelmed by viewing too many layer names in the Layer Properties Manager.

In this section, you explore how to create and apply Layer Filters to make working with layers easier.

Applying Layer Filters

Applying a Layer Filter is pretty simple. By opening the Layer Properties Manager dialog box, and then selecting a saved filter from the Named Layer Filters drop-down list, AutoCAD instantly adjusts the display of layers in the Layer Properties Manager’s layer list.

Each AutoCAD drawings automatically includes three standard Layer Filters:

  • Show All Layers

  • Show All Used Layers

  • Show All Xref-Dependent Layers

With these three layer filters, you can make viewing layer lists much easier. Additionally, the Layer Properties Manager includes two options that allow you to perform the following actions:

  • Invert the current layer filter.

  • Apply the current layer filter to the Layer control in the Object Properties toolbar.

In the next exercise, you learn how to use these standard layer filter features.

APPLYING THE LAYER PROPERTIES MANAGER’S STANDARD FILTER FEATURES

  1. Open the drawing 04DWG03. The drawing displays a column of lines, symbols (block inserts), and text.

  2. From the Object Properties toolbar, click the Layers button. AutoCAD displays the Layer Properties Manager dialog box.

  3. From the Named Layer Filters drop-down list, choose the Show All Used Layers filter. AutoCAD invokes the selected layer filter.

    The Show All Used Layers filter displays only layer names on which objects reside. If a layer does not have any objects drawn on it, then it is not displayed in the Layer Properties Manager’s layer list. This filter is useful in determining which layers are no longer used by objects, and can therefore be deleted.

    Next, you apply the Invert Filter feature.

  4. From the Named Layer Filters area, select the Invert Filter check box. AutoCAD inverts the current layer filter, displaying only those layers that do not have objects on them, as shown in Figure 4.18.

    Figure 4.18. The current layer filter is inverted, and therefore only displays layer names with no objects on them.

    Notice in the lower-left corner of the Layer Properties Manager that AutoCAD indicates 36 total layers, but only six layers are displayed. Once again, the currently displayed layers have no objects on them. Consequently, you could delete these layers to reduce the number of layer names cluttering the layer list.

    Next, you apply the Apply to Object Properties Toolbar feature.

  5. From the Named Layer Filters area, select the Apply to Object Properties Toolbar check box, then click OK.

  6. From the Object Properties toolbar, choose the down arrow to open the Layer control, as shown in Figure 4.19. This drawing is used in the next exercise. If you wish to continue the next exercise at a later time, be sure to save the changes you made during this exercise.

    Figure 4.19. The current inverted layer filter is applied to the Layer control list in the Object Properties toolbar.


Notice that the current inverted layer filter is applied to the Layer control list in the Object Properties toolbar. This feature is very useful when you need to frequently switch between a few layers in a drawing that contains many layers.

The other layer filer that AutoCAD provides is the Show All Xref-Dependent Layers filter. This filter displays only the names of layers that reside in xrefs. By selecting this filter, you can easily view only the layers of attached xrefs. By inverting this filter, you can display all layers that do not reside in attached xrefs. This provides you the ability to remove unwanted xref layer names from the layer list and the Layer control list on the Object Properties toolbar.

Next, you learn how to create your own layer filters.

Creating Named Layer Filters

In the previous section, you learned how to use the standard layer filters provided with AutoCAD. Although these filters are useful, they probably will not fulfill all your filtering needs. To satisfy all your needs, the Layer Properties Manager allows you to create your own layer filters.

In the next exercise, you learn how to create custom layer filters.

CREATING CUSTOM LAYER FILTERS

  1. Continue using the drawing from the previous exercise.

    From the Object Properties toolbar, click the Layers button. AutoCAD displays the Layer Properties Manager dialog box.

  2. From the Named Layer Filters area, click the ellipses (…) button. (The ellipses button is next to the Named Layer Filters list down arrow.) AutoCAD displays the Named Layer Filters dialog box.

  3. In the Filter Name list box, type Symbols Only .

  4. In the Layer Name text box, type *symbol . The asterisk (*) is a wild card character that tells AutoCAD to accept any characters in front of the word “symbol.” The Named Layer Filters dialog box appears as shown in Figure 4.20.

    Figure 4.20. The Named Layer Filters dialog box allows you to create custom layer filters.

  5. Click the Add button. AutoCAD adds the new filter to the list of available filters, then sets the filter fields back to their default value.

  6. Click the Close button. AutoCAD displays the Named Layer Filters dialog box.

  7. From the Named Layer Filters drop-down list, choose the Symbols Only filter. AutoCAD invokes the selected layer filter.

  8. From the Named Layer Filters area, click the Invert Filter check box to turn it off. AutoCAD displays only those layer names that end with the word “Symbol,” as shown in Figure 4.21. This drawing is used in the next exercise. If you wish to continue the next exercise at a later time, be sure to save the changes you made during this exercise.

    Figure 4.21. The custom layer filter Symbols Only displays layer names that end with the word “Symbol.”


By using the numerous fields available in the Named Layer Filters dialog box, you can precisely identify the layers you want to display. Additionally, by inserting asterisks in the layer name, you can filter for layers whose differing names have only certain words in common.

Next, you learn how to more precisely identify layers.

CREATING PRECISE CUSTOM LAYER FILTERS

1.
Continue using the drawing from the previous exercise.

2.
From the Named Layer Filters area, click the ellipses (…) button. AutoCAD displays the Named Layer Filters dialog box.

3.
In the Filter Name list box, type Symbols and Text not Red .

4.
In the Layer Name text box, type *symbol,*text . (Be sure to include the asterisks, and do not insert a space after the comma.) You can enter multiple layer names by separating each name with a comma.

5.
In the Color text box, type red . The tilde (∼) instructs AutoCAD to exclude layers whose color is red. The Named Layer Filters dialog box appears as shown in Figure 4.22.

Figure 4.22. Custom layer filters can include multiple layer names, and can exclude certain properties by placing a tilde symbol in front of the property value.


6.
Click the Add button. AutoCAD adds the new filter to the list of available filters, then sets the filter fields back to their default value.

7.
Click the Close button. AutoCAD displays the Named Layer Filters dialog box.

8.
From the Named Layer Filters drop-down list, choose the Symbols and Text not Red filter. AutoCAD invokes the selected layer filter. AutoCAD displays only those layer names that end with the word “Symbol” or “Text,” and excludes layers whose color is red, as shown in Figure 4.23.

Figure 4.23. The custom layer filter Symbols and Text not Red displays only those layer names that end with the word “Symbol” or “Text,” and excludes layers whose color is red.


When finished, you may close the drawing without saving your changes.


Using Wild Card Characters in Layer Filters

As you just learned, you can use wild card characters such as the asterisk (*), comma, and tilde (∼) to control which layers display in the Layer Properties Manager’s layer list. There are, in fact, 10 different wild card characters you can use with layer filters, and these wild card characters can be used in combination with each other. The following table lists the available wild card characters and their purposes.

Table 4.1. Wild Card Characters
Character Description
# (Pound) The # symbol matches any single numeric character. Suppose you have layer names that are labeled with numbers 1 through 400. You can filter for layer names 200 through 299 by typing 2## as the layer name filter.
@ (At) The @ symbol matches any single alpha character. Suppose you have two layers, named NORTH and SOUTH. You can filter for both these layer names by typing @O@TH as the layer name filter.
. (Period) The . symbol matches any single non-alphanumeric character. Suppose you have layers named GAS-TXT, GAS TXT, and GAS_TXT. Notice that the alpha characters are separated by a hyphen, a space, and an underscore character, respectively. You can filter for these three layer names by typing GAS.TXT as the layer name filter.
* (Asterisk) The * symbol matches any character sequence, and can be used at the beginning, middle, or end of the filter. Suppose you have layers whose names include the word LINE. You can filter for these layer names by typing *LINE* as the layer name filter.
? (Question Mark) The ? symbol matches any single character. Suppose you have layers named GAS-TXT, GAS2TXT, and GASeTXT. You can filter for these three layer names by typing GAS?TXT as the layer name filter.
(Tilde) If the symbol is the first character in the filter, then it excludes the filter value. Suppose you have layers that include the name LINE. You can filter for layers that do not include the name LINE by typing ∼*LINE* as the layer name filter.
[ ] (Brackets) The [ ] symbol matches any one of the characters enclosed in the brackets. Suppose you have four layers whose names are 1LINE, 2LINE, 3LINE, and 4LINE. You can filter for the layers whose names begin with 1, 2, or 4 by typing [124]* as the layer name filter.
[∼ ] (Tilde Brackets) The [∼ ] symbol excludes each of the characters enclosed in the brackets that follow the tilde. Suppose you have four layers whose names are 1LINE, 2LINE, 3LINE, and 4LINE. You can exclude the layers whose names begin with 1, 2, or 4 by typing [∼124]* as the layer name filter.
- (Hyphen) The symbol used inside brackets allows you to specify a single-character range of values. Suppose you have four layers whose names are 1LINE, 2LINE, 3LINE, and 4LINE. You can filter for the layers whose names begin with 1, 2, or 3 by typing [1-3]* as the layer name filter.
, (Comma) The , symbol separates multiple filters, allowing you to enter more than one filter in a text box. Suppose you have four layers whose names are 1LINE, 2LINE, 3LINE, and 4LINE. You can filter for the layers whose names begin with 1 or 3 by typing 1*,3* as the layer name filter.


The wild card characters listed in Table 4.1 can be used for several of the filters in the Named Layer Filter dialog box, including the following:

  • Layer name

  • Color

  • Lineweight

  • Linetype

  • Plot style

By using the wild card characters, you can develop powerful layer filters that display only the precise layers you want to view in the Layer Properties Manager or the Object Properties toolbar.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint