AutoCAD Platform Customization. Ambrosius Lee

Читать онлайн.
Название AutoCAD Platform Customization
Автор произведения Ambrosius Lee
Жанр Зарубежная образовательная литература
Серия
Издательство Зарубежная образовательная литература
Год выпуска 0
isbn 9781118798911



Скачать книгу

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.

image

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