Saturday, February 21, 2009

Working with Layers, Linetypes, Lineweights & Colors in AutoCAD



Layers are one of the most important features found in AutoCAD. You can use them to control the appearance of objects you create.

You learn how to:

  • Create layers
  • Draw objects on layers
  • Use layers to control object color
  • Use layers to control object visibility
  • Use layers to control object linetypes
  • Move objects from one layer to another
By the time you complete this project, you should feel comfortable using AutoCAD layer, linetype, and color tools when you work on your own drawings.
©1997-2005 OpenCAD International, Inc.
For exclusive use of Registered User

Understanding Layers

Most people use layers to control the color and visibility of objects in their drawings. Layers can be thought of as transparent pieces of plastic upon which you have created design geometry. When you look at all the layers together, you see a complete drawing. You can turn off or freeze layers to hide the objects on those layers. You can turn layers back on or thaw layers to make the objects on them visible again.

Understanding How Layers Determine How Objects Plot

In manual drafting environments, design professionals use different weights of pen to designate different types of geometry. For example, an architect may elect to draw the walls of a building in a heavy pen, and the plumbing or electrical plans in a lighter pen. Mechanical design professionals may draw orthogonal views in one pen weight, and the dimensions for those views in another. Documenting different types of geometry in different lineweights makes drawings easier to read. There are several methods you can use to determine the lineweight, linetype and other properties used to plot drawings:

  • One way to control the lineweight in which AutoCAD plot objects is to assign colors to the layers on which the objects reside. Using color-based plot styles and plot style tables. You can then use specify that objects in a given color should be plotted with a specific lineweight, linetype, screening value or fill style.
  • If you prefer, you can assign colors directly to objects, but this means that in order to modify the color later, you have to select the object again. When you assign colors to a wide variety of objects drawing maintenance can be difficult. No matter how colors are assigned to objects, they can still be used with plot styles and plot style tables to determine the linetype, lineweight, and other properties used to plot the objects.
  • If you do not want to use plot styles and plot style tables to control how objects plot, you can just assign linetype and lineweight properties directly to objects or layers. Generally this makes your drawings hard to maintain over time, because if your drawing standard changes so that objects once plotted in a .05mm lineweight must now be plotted in a .09mm lineweight, you must individually update all the affected layers and objects.

In this project you learn how you can use layers, colors, and linetypes to organize your drawings and to make them easier to maintain. You also learn how assigning objects to layers lets you control their visibility. By the time you complete this project, you should feel comfortable using AutoCAD's layer, linetype and color tools when you work on your own drawings.

    In addition to controlling object color and linetype with layers, you also use layers to control object visibility. You can make objects appear or disappear by modifying properties of the layers on which they reside. We review this use of layers later in this project.
©1997-2005 OpenCAD International, Inc.

Launching the Layer Manager

You use AutoCAD's Layer Properties Manager to create layers. From this dialog box, you can create layers, rename layers, assign linetypes to layers, assign colors to layers, turn layers on and off, freeze and thaw layers, delete layers, and lock layers so they can be viewed but not edited.

Every layer is identified by a unique name, composed of up to 32 alphanumeric characters, dashes, or underscores, but without spaces.

Follow these instructions to use the Layer Properties Manager to create a new layer:

  1. Open the 7007.dwg file.
  2. On the Layers toolbar, choose Layer Properties Manager.
  3. In the Layer Properties Manager, select New.
  4. Type Wire to specify the name of the new layer.
©1997-2005 OpenCAD International, Inc.

Creating Layers

In general, the name you assign to a layer should describe the objects on that layer. In large drawings with lots of layers, you may elect to establish a naming convention that makes the layers easier to organize.

For example, an architect may elect to assign names like 1-WALLS, 1-WINDOWS, 1-DOORS, 1-ELECTRICAL, 2-WALLS, 2-WINDOWS, 2- DOORS, and 2-ELECTRICAL to the layers in a multi-story building. Doing this will allow the architect to display all the layers associated with the first floor while hiding all the layers associated with the second floor. This makes the drawing easier to manage. You may want to rename layers in a drawing to make the drawing easier to work with.

    If you work for a company with a wide variety of existing drawings, take time to study the layer naming convention. Make sure you understand what objects should appear on each layer. If you have questions about the standard, talk to the CAD manager. It can be very time consuming to move large quantities of objects drawn on the wrong layers to the right layers. Its best to avoid the problem when you can.
    If you find you keep turning the same layers on and off in every drawing, consider saving a Layer State so you can turn them on and off all at once. This tool, in effect, just save the configuration of the layers in a drawing for future use.

Follow these instructions to rename a layer:

  1. Select the lC layer from the layer list.
  2. Click between the letters l and C. This indicates that you want to rename the layer.
  3. Type LOGIC to rename the layer.

  4. Choose OK to exit this window.
  5. Click on the Layer list to see the layer you created and the one you modified.

    By default, every drawing comes with one layer, called layer 0. You cannot delete or rename layer 0, because AutoCAD uses it as a construction layer for many internal operations. As you work with AutoCAD, other layers may "magically" appear, including layers required for dimensions and solid modeling. You should not delete or modify these layers in any way, as doing so may disable those functions in AutoCAD, or destroy objects in your drawing.
©1997-2005 OpenCAD International, Inc.

Assigning Linetypes & Lineweights to Layers

You can assign linetypes and lineweights to layers from within the Layer Properties Manager. You may elect to assign these properties to layers using plot styles and plot style tables, or to apply these properties directly to the objects themselves. These options are addressed later in this project.

Follow these instructions to load linetypes and assign them to objects:

  1. On Layers toolbar, choose Layer Properties Manager.
  2. Select the word "Continuous" associated with the Wire layer. This is the linetype currently assigned to this layer.
  3. In the Select Linetype dialog box, choose Load to indicate that you want to load a new linetype from the library of linetypes that ship with AutoCAD.
  4. From the Load or Reload Linetypes dialog box, in the linetype list, select Hidden.
  5. Choose OK to exit this dialog box.
  6. In the Select Linetype dialog box, select the Hidden linetype.
  7. Choose OK to exit the Select Linetype dialog box. Note that the Wire layer is now associated with the Hidden linetype.

  8. Repeat this procedure to assign the Dashed linetype to the Board layer.
  9. Select the Default entry under Lineweight associated with the Bracket layer.
  10. From the list of lineweights, choose 0.30mm.

  11. Choose OK to exit the Lineweight dialog box.
  12. Choose OK to exit the Layer Properties Manager.
  13. From the Format menu, choose Linetype to display the Linetype Manager.
  14. Select the Show Details button, if necessary, to show the Global Scale Factor box.
  15. Type 5 in the Global Scale factor box. This specifies that you want the linetype pattern to repeat once every five units, thus increasing the length of the dashes and lines that appear in your drawing.
  16. Choose OK to exit the Linetype Manager.
  17. From the Layer toolbar, in the Layer Control list, select the lightbulb associated with the Bracket layer to turn it on.
  18. Click outside the Layer Control list to exit the interface. Note that a bracket and screws now appears on the right side of the object.
  19. Select the LWT button found on the status bar at the bottom of the screen. This will make lineweights visible in the drawing. Note that if the lineweight were too thin, you would have to zoom in to see the effect. If you prefer you can type LINEWEIGHT and then choose Display Lineweight to display the lineweights assigned to objects in the drawing.

    If you change the linetype associated with a layer, but the linetype does not appear to change in the drawing, chances are that your Global linetype scale factor is too large or small. Try resetting the Global scale factor to 1, then increasing the values by multiples of 5 or 10 (ex: 1, 5, 10, 50, 100?) to find the right linetype scale factor.

    AutoCAD features two linetype libraries: acad.lin and acadiso.lin.lin. When you start a new drawing using the Start from Scratch option and specify whether you want to work in English or metric units, AutoCAD determines which linetype library to make available to you. There is relatively little difference between the two files, but if you plan to create your own linetypes you will need to know which linetype file AutoCAD is using.

©1997-2005 OpenCAD International, Inc.

Moving Objects to Another Layer

Now that you have learned how to create layers and assign colors and linetypes to them, you need to know how to determine the layer upon which objects are placed. The easiest way to ensure that objects end up on the right layer is to draw them on that layer. AutoCAD lets you specify a current layer, which is the layer on which new objects will be drawn.

Follow these instructions to make a layer current and draw a polygon:

  1. From the Layer Toolbar, in the Layer Control list, select LOGIC. This specifies that new objects should be drawn on the LOGIC layer. Note: If you see grips on your objects, press ESC before performing this step or you will move the selected objects to the LOGIC layer.
  2. From the Draw toolbar, choose Polygon.
  3. Type 3 to specify the number of sides for the polygon.
  4. Type E to indicate that you want to draw one side of the polygon and have AutoCAD create the remaining sides.
  5. Type 21,39 to specify the first corner of the polygon.
  6. Type @2<0 to specify the location of the second corner. You should see a triangle appear in the center of the largest chip on the circuit board. The triangle is is on the LOGIC layer.

    AutoCAD features an even faster way to change layers. From the Layer toolbar, choose Make Object's Layer Current, and then choose an object on the layer on which you want to draw.

    The layer on which objects are drawn can have a profound impact on the behavior of those objects when they are turned into blocks. This is covered in later OpenCAD lessons.

©1997-2005 OpenCAD International, Inc.

Drawing Objects on a Layer

Since it's impossible to draw objects on the correct layer every time, AutoCAD lets you move objects from one layer to another. One way to do this is to select the objects, then select the desired layer from the Layer Control list in the Layer toolbar.
    Note that the options in the Layer toolbar change their behavior when objects are selected. If no objects are selected, selecting a layer from the Layer Control list specifies the current layer. If objects are selected, selecting a layer from the Layer Control list moves the selected objects to this layer.

  1. Select the objects shown in the image.
  2. From the Layer toolbar, in the Layer Control list, select Wire.
  3. Press ESC twice to clear the grips from the objects. Note that their color has changed.
Now that you have learned how to create and control layers, take time to experiment with these tools. Create new layers, place objects on them, modify their parameters.
©1997-2005 OpenCAD International, Inc.