Assigning Shapes and Masters to Layers

In Microsoft® Visio®, you can organize related shapes in a drawing into named categories called layers.

In other graphics programs, the term layers often refers to the drawing order (the front-to-back position) of objects on the page. However, in Visio, shapes can be assigned to more than one layer, and the layer information for a shape is independent of the shape's display order and even its group membership. You can hide or show layers, print them or not, or protect layers from changes. Additionally, each page in a document might have its own set of layers. When you design masters, you can assign them to layers; when users create instances of those shapes, they are automatically assigned to those layers.

Shapes can belong to more than one layer. Here, the lake and compass shapes belong to the Streets layer (A), the Landmarks layer (B), and the Routes layer (C).

Shapes can belong to more than one layer. Here, the lake and compass shapes belong to the Streets layer (A), the Landmarks layer (B), and the Routes layer (C).

In this section…

Using Layers Efficiently

Assigning Masters to Layers

Using Layers Efficiently

When a user drags a master onto the drawing page, the instance inherits layer information from the master. If the master is assigned to a layer that doesn't exist on the page, Microsoft® Visio® automatically creates the layer. When shapes include layer assignments, users can highlight shapes by layer in different colors, print shapes by layer, lock all shapes on a layer, and hide all shapes on a layer. A shape can belong to more than one layer, so you can create shapes that reflect complex real-world usage.

For example, if you're creating shapes for an office plan stencil, you can assign the wall and door shapes to one layer, window shapes to their own separate layer, electrical outlet shapes to another layer, and furniture shapes to a fourth layer. You might highlight all of the shapes on the electrical outlet layer to make them more visible, or you might lock the wall layer while editing shapes on the window layer to prevent unwanted changes.

Layers belong to pages; every page has a list of layers associated with the page. Shapes appear on layers and can belong to more than one layer. By hiding or locking different layers on a page, you can control which shapes are visible or editable.

Because layers belong to pages, each page in a drawing file can have a different set of layers. Both foreground and background pages can have layers to organize the shapes that appear on them. A shape can belong to any and all layers on the current page. If you copy a shape that belongs to a layer to another page in the drawing, the associated layer is added to the destination page, if it doesn't already exist.

To create layers and to control the behavior of each layer

  • On the View menu, click Layer Properties, and then select options.

To remove layers

  • On the View menu, click Layer Properties. In the Layer Properties dialog box, select Remove unreferenced layers, and then click OK.

TOP

Assigning Masters to Layers

When you create page-based layers in the Layer Properties dialog box, each layer is assigned a numerical index in addition to its name. The index for the first layer created is 0, the index for the second layer is 1, and so forth. Deleting layer 0 does not decrement the other layer index numbers. Layers are listed in alphabetical order in the dialog box, so the order of layers in the dialog box does not necessarily correspond to the layer index numbers.

When you assign a master to a layer, each layer you create is assigned a new number. However, when an instance of the master is dropped on the page, the layer index numbers for the page override those originally assigned to the master's layers.

For example, suppose that a page has two layers, A and B, and the indexes for these are 0 and 1. If a user drops an instance of a master that contains a layer Z onto the drawing page, and its index in the master's layer list is 0, the layer Z is added to the page's layer list and its index number is overridden. Layer Z is assigned 2 as its new numerical index.

When you assign a shape to a layer, the Layer Membership section of the shape's sheet uses the layer index number to indicate to which layers the master or shape is assigned. If you plan to use the ShapeSheet® window to assign shapes to a layer, it's a good idea to include the layer's index number as part of its name.

To assign a master to a layer

  1. Right-click the master in the stencil window, and then click Edit Master on the shortcut menu.
  1. Select the master, and then click Layer on the Format menu.
  1. In the New Layer dialog box, type a name for the layer to which you want to assign the shape, and then click OK to display the Layer dialog box, where the new layer appears in the list.
  1. To assign the master to another layer, click New and repeat step 3.
  1. Click OK to close the Layer dialog box, click the close button to close the master drawing window, and then click Yes to update the master.

To assign a shape to a layer

  1. Right-click the shape, point to Format, and then click Layer.
  1. In the Layer dialog box, select the layer to which you want the shape to belong, and then click OK.
  • If no layers currently exist, the
  • New Layer
  • dialog box appears. Type a name for the new layer, and then click
  • OK
  • to display the
  • Layer
  • dialog box, where the new layer appears in the list.
  1. Click OK to close the Layer dialog box.

For more details about working with layers on the drawing page, such as assigning color and transparency to a layer, see the Microsoft Visio Help (on the Help menu, click Microsoft Visio Help).