Читать книгу AutoCAD Platform Customization - Ambrosius Lee - Страница 23

Part I
AutoCAD Customization: Increasing Productivity through Personalization
Chapter 2
Working with Nongraphical Objects
Managing Object Properties with Layers

Оглавление

Objects in a drawing have a number of properties in common with each other: color, linetype, lineweight, and several others. These are often referred to as an object's general properties. You can modify these properties individually using the Properties palette (Windows) or Properties Inspector (Mac OS) or let an object inherit values based on the layer in which it is placed.

I recommend allowing objects to inherit their properties from the layer in which they are placed; it is much easier to modify a single layer than it is to modify several thousands of objects. In addition, layers make it much simpler to control the visibility, locking, and plotting state of all related objects on a layer. An object's general properties must be set to ByLayer to allow it to inherit the property values of the layer it is on. Setting an object's property value directly overrides the layer's property value, which could have undesired effects when plotting or printing a drawing.

Layers are commonly created using the layer command. As a rule of thumb, don't allow individual users to create their own layers in each drawing, as doing so can introduce the following:

• Errors against the established CAD standards; the wrong layer name or incorrect property values

• Inefficiencies in your processes because of the amount of time it takes to define each layer that is needed

You can add all your commonly used layers to drawing template files so they are ready for use when the drawing is created. However, if a layer is not used it can inadvertently be purged from a drawing with the purge command. If a layer that was purged is needed later in the project, that layer will need to be re-created manually, inserted as a block that contains the missing layers, or re-created using an automated process. One of the simplest solutions to restoring standard layers that were purged from a drawing is to maintain a drawing file that contains the same layers as those in your drawing template files. Then, you can insert the drawing file with the insert command; all previously purged layers that were part of your drawing template file are restored and the layers that exist in both drawings are ignored.

In addition to adding your layers to a drawing template, consider using the – layer command in a script file or custom program to create the layers you need in a drawing. This approach has two benefits: you can use the script or program to create the layers in your drawing template file, and you can use it to reset the properties of layers if someone changes their values to be different from your CAD standards.

Setting the Default Properties for New Objects

When new objects in a drawing are created, they take on not only the current layer, but also a number of other values that are typically set to the value ByLayer or 0.0000. You can adjust these properties in the General section of the Properties palette (Windows) or Properties Inspector (Mac OS) when no object is currently selected. You can also use the ribbon controls in AutoCAD on Windows. As an alternative, the system variables listed in Table 2.1 can be used to control the default property values assigned to new objects that are created with a command.


Table 2.1 System variables used to set default property values


These system variables are helpful if you decide to create scripts or custom programs that create new objects or perform drawing setup tasks. I cover scripts in Chapter 8.

In most cases, you want to make sure that these variables are set to ByLayer or the equivalent value to make sure your new objects inherit the properties from the layer they are placed on. You can use the setbylayer command to reset an object's properties to ByLayer.

Creating and Managing Layers

You typically use the Layer Properties Manager (Windows) or Layers palette (Mac OS) to create new layers and edit existing ones in a drawing. When one of the interfaces is displayed, you click the Create New Layer (Windows) or New Layer (Mac OS) button and then set the properties in the Layers list for the new layer. Editing a layer is similar to the steps you take when creating a layer, except that you just need to click on the layer's row and in one of the properties on that row to begin editing the layer.

Follow these steps to create a new layer in AutoCAD on Windows:

1. On the ribbon, click Home tab ➢ Layers panel ➢ Layer Properties (or at the command prompt, enter layer and press Enter).

2. When the Layer Properties Manager (see Figure 2.3, top) opens, click Create New Layer.

TIP

If a layer already exists with the property values close to the new layer you want to create, select the layer that you want to base the new layer on and then click Create New Layer.

3. Enter a name that follows your company's established CAD standards.

4. In the new layer's row, click one of the columns that represents the properties of the layer. The following explains what to do after clicking on the column:

• On: Toggles the layer on or off. When set to Off, objects on the layer can still be selected using the All keyword at the Select objects: prompt, and the objects are regenerated when the drawing's display is updated.

• Freeze: Toggles the freeze and thaw states of the layer. When set to Freeze, objects on the layer can't be selected using the All keyword at the Select objects: prompt, and the objects aren't regenerated when the drawing's display is updated.

• Lock: Toggles the lock state of the layer. The Lock setting restricts objects on the layer from being selected at the Select objects: prompt.

• Color: Displays the Select Color dialog box. Select a color value and click OK. For more information, see the section “Significance of Colors” later in this chapter.

• Linetype: Displays the Select Linetype dialog box. Select a loaded linetype and click OK. If the linetype you want to use is not loaded, click Load and load the layer first. For more information, see the section “Defining Appearance with Linetypes, Lineweights, and Transparency” later in this chapter.

• Lineweight: Displays the Lineweight dialog box. Select a lineweight and click OK. For more information, see “Defining Appearance with Linetypes, Lineweights, and Transparency.”

• Transparency: Displays the Layer Transparency dialog box. Enter a new transparency value between 0 and 90, and click OK. For more information, see “Defining Appearance with Linetypes, Lineweights, and Transparency.”

• Plot Style: Displays the Select Plot Style dialog box. From the Active Plot Style Table drop-down list, select the plot style file that you want to use for the current layout. Select one of the available plot styles to assign to the layer and click OK. (This option is available only if the drawing, drawing template, or drawing standards file is set up to use named plot styles.)

• Plot: Toggles the plottable state of the layer. Objects on the layer that is not plottable are displayed in the drawing window but are not part of the output when the drawing is plotted or printed.

• New VP Freeze: Toggles the freeze and thaw states of the layer when a new floating viewport is created on a named layout.

• VP Freeze: Toggles the freeze and thaw states of the layer in the current viewport.

• VP Color, VP Linetype, VP Lineweight, VP Transparency, and VP Plot Style: These properties can be changed just like the properties without the VP prefix previously described.

• Description: Double-click to edit the description of the layer. Adding a description can be helpful to those new to or unfamiliar with your CAD standards.

TIP

Right-click the column headings in the Layer Properties Manager to control which columns you display. If there are properties that you commonly do not use, you can turn them off.

5. Repeat steps 2–4 for each layer you want to create.

6. Double-click one of the layers in the Layers list, select a layer from the Layers list, and click Set Current, or choose a layer from the Layer drop-down list on the Home tab ➢ Layers panel of the ribbon to set a layer as current.


Figure 2.3 Organizing objects with layers


If you are using AutoCAD for Mac, follow these steps to create a new layer:

1. Click Format menu ➢ Layers (or at the command prompt, enter layer and press Enter).

2. On the Layers palette (see Figure 2.3, bottom), click New Layer.

TIP

If a layer already exists with the property values that are close to those you need in the new layer you want to create, select the layer that you want to base the new layer on before clicking New Layer.

3. Enter a name that follows your company's established CAD standards.

4. With the new layer's row selected, do one of the following:

• On the Layers palette, click one of the columns that represents the properties of the layer.

• On the Properties Inspector palette, on the Layer Properties tab click one of the controls to edit the property's value.

The following explains what to do after you click on a column in the Layers palette or control in the Properties Inspector palette:


• On (Visibility): Toggles the layer on or off. When set to Off, objects on the layer can still be selected using the All keyword at the Select objects: prompt, and the objects are regenerated when the drawing's display is updated.


• Freeze: Toggles the freeze and thaw states of the layer. When set to Freeze, objects on the layer can't be selected using the All keyword at the Select objects: prompt, and the objects aren't regenerated when the display of the drawing is updated.


• Lock: Toggles the lock state of the layer. The Lock setting restricts objects on the layer from being selected at the Select objects: prompt.


• Color: Choose a color from the drop-down list or choose Select Color to display the Color Palette dialog box. Select a color value and click OK. For more information, see “Significance of Colors” later in this chapter.


• Linetype: Choose a linetype from the drop-down list or choose Manage to display the Select Linetype dialog box. Select a loaded linetype and click OK. If the linetype you want to use is not loaded, click Load and load the layer first. For more information, see “Defining Appearance with Linetypes, Lineweights, and Transparency” later in this chapter.


• Lineweight: Choose a lineweight from the drop-down-list. For more information, see “Defining Appearance with Linetypes, Lineweights, and Transparency.”


• Transparency: Click and drag the slide to specify a new transparency value. For more information, see “Defining Appearance with Linetypes, Lineweights, and Transparency.”


• Plot Style: Choose a plot style from the drop-down list.


• Plot: Toggles the plottable state of the layer. Objects on the layer that is not plottable are displayed in the drawing window, but the objects are not part of the output when the drawing is plotted or printed.


• New VP Freeze/Freeze In New Viewports: Toggles the freeze and thaw states of the layer when a new floating viewport is created on a named layout.


• VP Freeze/Viewport Freeze: Toggles the freeze and thaw states of the layer in the current viewport.


• VP Color, VP Linetype, VP Lineweight, VP Transparency, and VP Plot Style: These properties can be changed just like the properties without the VP prefix previously described.


• Description: Edit the description of the layer. Adding a description can be helpful to those new to or unfamiliar with your CAD standards.

TIP

Right-click the column headings in the Layers palette to control the display of which columns you want to display. If there are properties that you commonly do not use, you can turn them off.

5. Repeat steps 2–4 for each layer you want to create.

6. Double-click one of the layers in the Layers list or choose one from the Layers drop-down list at the top of the palette to set it current.

Significance of Colors

The use of color in a drawing serves two distinct purposes. The first is to make objects easy to distinguish from each other, and the second is to control the way the objects in your drawing are output. A majority of drawings use color-dependent plot styles. However, that does not mean they are plotted or printed in color, just that each unique color in a drawing can be used to control not only the color of an object when it is output, but also several other object properties. In addition to color, plot styles can override the linetype, lineweight, and transparency (or screening) values that are assigned to an object directly or that it inherits from the layer. Object and layer colors do not affect the output of objects when you are using named plot styles, the other type of plot styles that AutoCAD supports.

From the Layer Properties Manager (Windows) or Layers palette (Mac OS), clicking the Color column of a layer allows you to display the Select Color dialog box or Color Palette (see Figure 2.4), respectively. This interface allows you to select from one of the AutoCAD index colors (255 unique colors), a true color value, or a color from one of the installed color books. The AutoCAD index colors are the most commonly used for both layers and objects because these values directly map to values in a color-dependent plot style (CTB) file. If you need to set an object's color directly, select the object and use the Color property on the Properties palette (Windows) or Properties Inspector (Mac OS).


Figure 2.4 Setting the color of a layer


Defining Appearance with Linetypes, Lineweights, and Transparency

Color is just one property of an object that affects how it appears onscreen and when it is output; the linetype, lineweight, and transparency properties also impact the way objects appear. These properties can be set by object using the Linetype, Lineweight, and Transparency properties on the Properties palette (Windows) or Properties Inspector (Mac OS). However, as I mentioned earlier, it is much more effective to let objects inherit property values from the layer they are placed on.

Linetypes

Linetypes help distinguish objects that make up your design from those that are used to annotate it by using gaps, dashes, and text in your linework. Common uses for linetypes are to indicate center lines that pass through the center of a circle or an arc, to show features that are behind or beyond an object with hidden or dashed lines, or even to designate where a utility line runs through a property by displaying text within the linework.

The size of the dashes, gaps, and text in a linetype is determined by the linetype definition and two scale factors:

• The global scale factor, which is set by the ltscale system variable

• The linetype scale assigned directly to an object

The global scale factor is often equal to or half the drawing scale that will be used to output the drawing. If your viewports are set to a scale of 1/4″ = 1′-0″, your drawing scale would be a factor of 48, which is calculated by the math statement of (1/4) × 12. Once you know the drawing scale, divide it by 2, and that will give you the range in which your global linetype scale should be – in this example, that range would be 24 to 48.

The predefined linetypes that come with AutoCAD are stored in the acad.lin and acadiso.lin files. You can create your own linetype definitions and store them in the LIN files that come with AutoCAD, or you can create your own LIN files. Creating custom linetype definitions is covered in Chapter 9, “Defining Shapes, Linetypes, and Hatch Patterns.” Linetypes must be loaded into a drawing with the Linetype Manager before they can be used. See Figure 2.5; the Windows version is displayed on top, and the Mac OS version is on the bottom. Once loaded, a copy of the linetype definition is stored in the drawing. When defining the layers in your drawing template files, only load the linetypes that are needed.


Figure 2.5 Managing linetypes and scales


Lineweights

By default, all linework in a drawing is displayed as a single pixel in width onscreen unless the object is a polyline with a specified width or you use lineweights. Both layers and objects have a Lineweight property, which can be used to control the width or thickness of the linework for the objects in a drawing. Controlling the width of the linework allows you to emphasize the walls of a building or the edges of the main elements in a design while putting less emphasis on dimensions and other annotation objects. The correct balance of lineweight widths used in a drawing can improve how objects within the design are communicated to a client or contractor.


Lineweights are commonly used to control the width in which an object should appear when plotted or printed, but they can also be used to affect how objects are displayed onscreen. If you want to display lineweights onscreen, you can use the Show/Hide Lineweight option on the application's status bar or change the value of the lwdisplay system variable.

The display of lineweights is different based on whether you are working on the model or in a named layout. The following explains the differences in the way lineweights are displayed.

Model Layout Independent of the current zoom scale, lineweights are measured in pixels. No matter the current zoom scale of the current view, the width of the linework never increases or decreases when zooming in or out.

Named Layout Lineweights are displayed based on the current zoom scale. Just like placing a magnifying glass over a sheet of paper, the magnification of the drawing makes the linework appear thicker; the same happens when zooming in or out on a layout.

You can modify the settings that affect the display of lineweights in a drawing by using the Lineweight Settings dialog box. See Figure 2.6; the Windows version is displayed on the left, and the Mac OS version is on the right. The Default (Windows) or New Layer Default (Mac OS) drop-down list controls the lineweight used by the Default value of the Lineweight property for layers and objects, which can also be set with the lwdefault system variable. Use the Adjust Display Scale (Windows) or Preview Scaling (Mac OS) slider to control the lineweight scale of all lineweights on the Model layout. The other area that may have some significance is the Units For Listing (Windows) or Units (Mac OS) section, which controls the values in which lineweights are expressed in the AutoCAD user interface: millimeters (mm) or inches (in). Units for listing lineweights can also be controlled with the lwunits system variable.


Figure 2.6 Controlling the display of lineweights


Transparency


Transparency gives you the ability to see through to what is below or beyond an object. Objects can have a transparency value of 0 (fully opaque/solid) to 90 (nearly fully transparent). Unlike lineweights, the display of transparency is much more useful onscreen in a complex drawing, but it can have an impact on the display of your drawing based on your workstation's hardware. You can use the Show/Hide Transparency option on the application's status bar or change the value of the transparencydisplay system variable.

Controlling Output with Plot Styles

While layers and object properties control much of the way objects are displayed onscreen, you can use plot styles to override those values to alter the way objects are plotted or printed. Plot styles can also be used to affect the way objects appear onscreen if the Display Plot Styles option is enabled in the Page Setup dialog box.

Plot styles are available in two styles: color-dependent and named. When you are using color-dependent plot styles, the name of the plot style is fixed based on the color value assigned to an object or the layer in which an object is placed. Assigning a named plot style to a layer or object is similar to assigning a linetype: first you specify which named plot style file you want to use, and then you specify the plot style you want to assign to the layer or object. For more information on plot styles and how to create them, see Chapter 1, “Establishing the Foundation for Drawing Standards.”

Accessing Layer Settings

Besides the properties for a layer that are accessible from the Layer Properties Manager (Windows) or Layers palette (Mac OS), several other settings affect the way layers look or behave in the drawing window. In AutoCAD for Windows, you can use the Layer Settings dialog box (see Figure 2.7) to change the current layer settings, but you can also use a few system variables to change some of these settings. In the dialog box, the settings with a small drawing file icon next to them (the blue-and-yellow sheet of paper) indicate that the setting is stored with the drawing.


Figure 2.7 Changing layer settings affects the way you work with layers in the drawing window and user interface.


In AutoCAD for Mac, there is no equivalent to the Layer settings dialog box (many of the same features in the Windows product are not available on Mac OS), but there are a few settings that you can access using system variables and commands to change your experience.

The Layer Settings dialog box in AutoCAD on Windows can be displayed by doing the following:

1. On the ribbon, click Home tab ➢ Layers panel ➢ Layer Properties.


2. In the Layer Properties Manager, click Settings, located near the upper-right corner.

Fading Objects on Locked Layers

Locking a layer ensures that the objects on that layer are not accidentally selected when editing other objects in a drawing, but they still can be used as reference geometry. To help make it easy to identify when a layer is locked, AutoCAD fades the objects on a locked layer so they are less prominent in the foreground. You can toggle this feature on and off, as well as control the amount objects are faded. By default, objects on locked layers are faded by 50 percent.

To change the amount a layer is faded, you can do one of the following:

• In the Layer Settings dialog box (see Figure 2.7), in the Isolate Layer Settings section, choose Lock And Fade, and then drag the Locked Layer Fading slider. If the slider is not enabled, click the Locked Layer Fading toggle (the stack of three papers with a lock icon) and then drag the slider. Click OK (Windows).

• On the ribbon, select Home tab ➢ Layers panel, click the panel's title to expand the panel, and drag the Locked Layer Fading slider. If the slider is not enabled, click the Locked Layer Fading toggle (the stack of three papers with a lock icon) and then drag the slider (Windows).

• At the command prompt, enter laylockfadectl and press Enter. Enter a new fade value and press Enter. Entering a negative value disables the fading of objects on a locked layer (Windows and Mac OS).

Isolating Objects; Turning Off or Locking

Isolating layers allows you to quickly turn off or lock layers, work with objects on other layers in the drawing, and then quickly restore the previous state of the layers in the drawing. Layers can be isolated with the layiso command, and isolation can be reversed (unisolated) with the layuniso command. You can control the default isolation mode that the layiso command uses.

To change the isolation mode of the layiso command, you can do one of the following:

• In the Layer Settings dialog box (see Figure 2.7), in the Isolate Layer Settings section, choose Lock And Fade to lock the layers when using layiso or click Off to turn them off instead. When you click Off, you have the option to turn the layer off or to freeze it in the current viewport when using layiso in a floating viewport. Click OK (Windows).

• At the command prompt, enter layiso and press Enter. Use the Settings option and specify the mode to use (Windows and Mac OS).

Evaluating and Reconciling New Layers

It is not uncommon to need a new layer here and there that deviates from your company's CAD standards, but new layers can affect the way a drawing is plotted or printed based on how that layer was defined. AutoCAD on Windows and Mac OS has a feature known as New Layer Notification, but it works slightly differently on the two platforms. On Windows, when the New Layer Notification feature is enabled and a new layer has been added to a drawing, a notification balloon (see Figure 2.8) is displayed, and a new layer filter named Unreconciled New Layers is created in the Layer Properties Manager. By default, the notification of new layers happens when an external reference is being attached, when a drawing is opened, when an xref is attached/reloaded, and when a layer state is restored.


Figure 2.8 Unreconciled layer notification balloon


On Mac OS, the feature is disabled out-of-the-box, so it must first be enabled. The notification balloon is not available on Mac OS, but the Unreconciled New Layers filter is created in the Layers palette when the feature is enabled and the correct conditions are met.

You can modify the settings of the New Layer Notification feature from the Layer Settings dialog box (see Figure 2.7) in AutoCAD on Windows, or with the following system variables on both Windows and Mac OS:

layereval Controls whether the layers in a drawing should be evaluated only when an xref is attached, or when a new layer is created in addition to when an xref is attached.

layerevalctl Disables or enables the New Layer Notification feature.

layernotify Specifies which drawing editor events display an alert message when layerevalctl is set to 1.

To reconcile a layer in AutoCAD on Windows, you need to perform the following steps:

1. On the ribbon, click Home tab ➢ Layers panel ➢ Layer Properties.

2. On the Layer Properties Manager, select the Unreconciled New Layers filter from the Filter Tree located on the left side. (If the Filter Tree is not displayed, right-click in the Layers list and click Show Filter Tree.)

3. In the Layers list, select the layers you want to reconcile and then right-click. Click Reconcile Layer.

4. Save the drawing. If saving a drawing is one of the events that triggers the Unreconciled New Layers notification, the balloon will be displayed each time a drawing is saved if you do not reconcile (or remove) all of the offending layers from the drawing.

Reconciling a layer in AutoCAD for Mac OS requires actions similar to those used on Windows. You can reconcile a layer on Mac OS using the following procedure:

1. Click Format menu ➢ Layers.

2. In the Layers palette, expand the Unreconciled New Layers filter from the Layers list. If the filter is not displayed, click Display Settings in the lower-right corner of the Layers palette and click Show Layer Groups; the option should now be checked. To make sure Unreconciled Layers is also checked, click Display Settings ➢ Show Automatic Groups ➢ Unreconciled Layers.

3. In the Layers list, select the layers you want to reconcile and right-click. Click Reconcile Layer.

4. Save the drawing.

For more information on the New Layer Notifications feature and reconciling layers, see the AutoCAD Help system.

Controlling the Layer Properties Manager and Ribbon Controls (Windows Only)

There are several settings that you can use to alter your experience with the Layer Properties Manager and the Layer list on the ribbon. These settings can be found under the Dialog Settings section of the Layer Settings dialog box (see Figure 2.7). The settings that can be changed:

Apply Layer Filter To Layer Toolbar (or Layer Drop-Down List on the Ribbon) This option aligns the list of layers displayed in the Layer Properties Manager with the Layer control on the Layer toolbar or Layers panel of the ribbon. This is helpful when working with drawings that contain hundreds of layers.

Indicate Layers In Use Use this option to control whether the icon in the Status column is updated to reflect if at least one object is placed on that layer in the drawing. This option can also be controlled with the showlayerusage system variable.

Viewport Override Background Color This option enables the highlighting of layers with viewport overrides in the Layers list of the Layer Properties Manager, or those in the Layer drop-down list on the Layer toolbar or Layers panel of the ribbon.

In addition to the settings under the Dialog Settings section of the Layer Settings dialog box, you can right-click the Layers list of the Layer Properties Manager to control the display of the Filter Tree and whether filters appear in the Layers list. You can also right-click a column heading in the Layers list to control which columns are displayed, or click and drag a column heading to reorder the columns. Clicking and dragging between columns adjusts the width of the column to the left.

Controlling the Layers Palette (Mac OS Only)

The Layers palette in AutoCAD for Mac doesn't have as many settings that control its behavior as the Layer Properties Manager in AutoCAD on Windows, but there are a few settings that can improve your experience. These settings are available from the Settings menu, which you can display by clicking the Display Settings button located in the lower-right corner of the Layers palette. These settings are available on the Settings menu:

Show Layer Groups This option controls the display of layer groups within the Layers list. You can also control where the layer groups are displayed: at the top or bottom of the Layers list.

Show Empty Groups Use Show Empty Groups to display or hide layer groups that do not have any layers in them.

Show Xref Layers This option controls the display of layers from attached xrefs in the Layers list.

Show Automatic Groups Show Automatic Groups controls the display of auto-generated layer groups based on specific criteria: all used layers, attached external references, layers with viewport overrides, and unreconciled layers.

View Options This option controls which columns are displayed in the Layers list.

You can also right-click a column heading to control which columns are displayed, or click and drag a column heading to reorder the columns. Clicking and dragging between columns adjusts the width of the column to the left.

Grouping and Filtering Layers

Filters in the Layer Properties Manager (Windows) or Layers palette (Mac OS) allow you work with groupings of layers much like you would an individual layer. AutoCAD creates a few layer filters dynamically based on events that happen in the drawing window, such as attaching an xref or creating a viewport override on a layer. You can also create one of two types of layer filters based on your own conditions:

Group Filter Using a group filter, you can create a static grouping of layers that are manually selected.

Dynamic or Property Filter Using a dynamic or property filter, you can create a grouping of layers defined by the properties they have in common.

You can create a group filter and add layers to it by taking the following steps:

1. Do one of the following:

• On the Layer Properties Manager, click New Group Filter (Windows).

• On the Layers palette, click New Layer Group (Mac OS).

2. Enter a descriptive name for the new group and press Enter.

3. Drag and drop layers from the Layers list onto the new group to create an association between the layers and group.

A property filter in AutoCAD on Windows can be created by following these steps:

1. On the Layer Properties Manager, click New Property Filter.

2. When the Layer Filter Properties dialog box (Figure 2.9, top) opens, enter a descriptive name in the Filter Name text box.

3. In the Filter Definition grid, set the properties you want to filter on. Click OK.


Figure 2.9 Creating dynamic filters based on layer names and properties


If you are using AutoCAD for Mac, do the following to create a dynamic filter:

1. On the Layers palette, click New Dynamic Layer Group.

2. When the New Dynamic Group dialog box (Figure 2.9, bottom) opens, enter a descriptive name in the Group Name text box.

3. In the Match Any Of The Following Rules section, set the properties you want to filter on.

4. Optionally, click the + (plus) button to add properties to the filter.

5. Click Create Group.

Creating and Using Layer States

Layer states allow you to take a snapshot of the current layers in a drawing. The snapshot includes the layers that currently exist in the drawing and their current property values. Any new layers added to a drawing are not automatically added to an existing layer state because they did not exist when the layer state was created. When a layer state is restored and new layers exist in the drawing, you have the option to turn off any layers that weren't saved with the layer state.

After you make changes to the layers in the drawing for editing, plotting, or display purposes, you can return the layers to their previous properties by restoring a saved layer state. Layer states can be beneficial when you receive a drawing from a client and want to make sure that the layers are just like they were when you received the drawing before sending it back to the client. You can create layer states in AutoCAD on Windows by using the Layer States Manager dialog box (see Figure 2.10) or with the State option of the – layer command. The Layer State Manager does not exist in AutoCAD for Mac, so you need to use the State option of the – layer command.


Figure 2.10 Saving layer states allows you to later restore the visibility and properties of the layers in a drawing.


The following steps explain how to create a layer state in AutoCAD on Windows:

1. On the ribbon, click Home tab ➢ Layers panel ➢ Layer States drop-down list ➢ Manage Layer States (or at the command prompt, enter layerstate and press Enter).

2. When the Layer States Manager (Figure 2.10) opens, click New.

3. In the New Layer State To Save dialog box, enter a name in the New Layer State Name text box. Optionally, enter a description. Click OK.

4. Optionally, click Edit to edit the layers and the properties that are being saved with the layer state. Make the edits in the Edit Layer State dialog box and click OK.

5. Click Save and then click OK.

If you are using AutoCAD for Mac or want to create a layer state from the command prompt in AutoCAD on Windows, do the following:

1. At the command prompt, enter -layer and press Enter.

2. At the Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/PStyle/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile]: prompt, type state and then press Enter.

3. At the Enter an option [?/Save/Restore/Edit/Name/Delete/Import/EXport]: prompt, type save and then press Enter.

4. At the Enter new layer state name: prompt, type a name for the new layer state and then press Enter.

5. At the Enter states to change [On/Frozen/Lock/Plot/Newvpfreeze/Color/lineType/lineWeight/TRansparency/plotStyle]: prompt, type a property to change and then press Enter, or simply press Enter if you don't want to make any changes to the new layer state.

6. Press Enter again to end the – layer command.

A layer state after it is saved can be restored by doing one of the following:

• In the Layer States Manager, select the layer state you want to restore and click Restore (Windows).

• On the ribbon, click Home tab ➢ Layers panel ➢ Layer States drop-down list and select the layer state you want to restore (Windows).

• At the command prompt, type -layer and press Enter. At the Enter an option prompt, type state and press Enter. At the Enter an option prompt, type restore and press Enter. At the Enter name of layer state to restore or [?]: prompt, type the name of the layer state to restore and press Enter. Press Enter again to end the – layer command (Windows and Mac OS).

AutoCAD Platform Customization

Подняться наверх