Managing Layers Basics
Prev | Chapter 9. Managing Layers | Next

## Managing Layers Basics

The Layers dialog is used to manage the order and visibility of each layer in a diagram.

### Create a New Layer

Creating a new layer is possible by clicking on the New Layer button at the bottom left of the dialog. Since the Layers dialog is not diagram specific but application specific, you will have to choose in which diagram the new layer must go in. To do so, at the top of the Layers dialog, select the diagram you wanted to receive the new layer and then add this new layer to the selected diagram.

The newly created layer will be placed on top of the stack and will become the current layer of the selected diagram.

Then it's possible to edit any new object of your choice, copy and paste from any other layer or diagram as you could do it in single layer diagram.

### Selecting Layers

A layer is said as being activated when it is selected in the Layers dialog. To select a layer simply click on its name in the dialog. The selected layer will then become highlighted. Changes to the diagram are made to the currently selected layer only.

### Note

Only one layer can be selected at a time. That way you can do anything you like in this selected layer without affecting other layers on your diagram.

### Ordering Layers

Next to the New Layer button at the bottom of the Layers dialog, are two useful buttons which allow you to set the stack order of each layer you created.

Those two buttons are used to raise and lower layers in the hierarchy of layers. The button with the up arrow is used to raise the active layer while the other is for lower the position within the hierarchy.

Ordering layers can be useful when you want hide some parts of an object with another one.

### Deleting Layers

When a layer is not required you can delete it. When deleting a layer, it and all of the objects contained in the layer are removed from the canvas. Layers are deleted by clicking on the Delete Layer button. Of course this will only affect the currently selected layer.

Doing so on regular basis is the better way to keep your diagram clean and light for when you want to export it to another format other than the native Dia format.

### Renaming Layers

Layers can be renamed to express the part of the diagram they represent, giving them the ability to be rapidly located among others. Most importantly, layers can be shown or hidden depending on what part of the diagram you would like to show.

Double-clicking on the name of the layer opens the Edit Layer Attributes dialog, which displays the current name of the layer in a textbox. Enter a new name for the layer in the textbox. To confirm the changes, depress the OK button. Selecting the Cancel button will close the Edit Layer Attributes dialog without making any changes.

### Tip

Naming layers that describe the purpose of the layer is a useful way to remember what it is for. Don't hesitate to create many different layers in your diagram, Dia doesn't constrain you on the number of layers you've created, so feel free to adjust the hierarchy of the diagram to your own needs.

Prev | Up | Next
Chapter 9. Managing Layers | Home | Viewing Layers