# Plans

> Use image-backed plans to position units in an installation.

Source: https://socketplan.com/docs/projects/plans

![SocketPlan plan view showing a floor plan with positioned electrical units](/showcase/en-organization-light.png)

## What are plans

Plans are essentially images representing any kind of reference you want to
use to graphically lay out electrical units. A common usage is to import
architectural floor plans, but they can be used for any other kind of technical
drawing (elevation drawings, diagrams) or photo (i.e. front views of walls
where electrical units will go).

## Creating plans

To create plans you can:

* drop one or more images in the initial project page,
* use the `New plan` or `+` call-to-action buttons in the empty plans
  section of the project sidebar.

### Supported formats

The image formats currently supported are:

* SVG
* WebP
* PNG
* JPEG

Raster images have a maximum file size of 10 MiB. SVG files have a maximum
file size of 2 MiB.

> **Tip**
>
> Use SVG for architectural drawings and technical diagrams whenever possible.
> SVG scales infinitely without quality loss and typically results in smaller
> file sizes compared to raster formats.

## Navigating plans

The toolbar at the bottom of the canvas provides three editing tools:

![Zoomed view of the plan tools palette](/showcase/plan-tools-palette-light.png)

* **Select** selects and moves units. Drag an empty area to draw a selection
  rectangle.
* **Pan** moves the viewport without changing unit positions.
* **Create unit** creates a unit where you click. Use its arrow to choose the
  type of unit before placing it.

Use the **Zoom out**,
**Zoom in**, and
**Zoom to fit** tools to adjust the plan
view. A mouse wheel or trackpad scroll also zooms the canvas, and a touch pinch
zooms it. Hold <kbd>Space</kbd> while dragging to temporarily pan without
leaving the current tool.

Use the **Change image** tool to select
a replacement for the current plan image. You can also drag a supported image
over the canvas and drop it on **Drop here to replace this plan's image**. Drop
it on **Drop here to create a new plan** to keep the current plan and import
the image separately.

## Plan units

### Adding units to a plan

Now that you have imported your drawing or photo, you can start adding units
on top of it. Select the **Create unit**
tool and click where the unit should appear. To use a different unit type,
choose it from the adjacent arrow before placing the unit.

To add an existing unit to a plan, use the `Show in plans` submenu in unit
context menus, then toggle the plan you want to add the unit to. From the
same submenu you can also toggle off the plans where you don't want the unit
to appear, and use the eye icon button to quickly navigate to that plan and
highlight the unit.

### Unit context menus

Right-click a unit on the plan to open a context menu with actions relevant to
that unit.

### Moving units on plans

![A unit being dragged while a horizontal alignment guide is visible](/showcase/en-plan-alignment-guide-light.png)

With the `Select` tool active, drag a unit and release it in the desired
position. Nearby units produce alignment guides and magnetic snapping on both
axes. The following modifiers make precise layouts faster:

* hold <kbd>Shift</kbd> while dragging to lock movement to the first detected
  horizontal or vertical axis,
* hold <kbd>Ctrl</kbd> to temporarily disable alignment snapping,
* hold <kbd>Alt</kbd> while starting a drag to duplicate the unit at the new
  position.

When multiple units are selected, dragging any selected unit moves or
duplicates the entire selection while preserving its layout.

### Selecting and aligning units

![A selection rectangle being dragged around several plan units](/showcase/en-plan-selection-rectangle-light.png)

Click a unit to select it. Hold <kbd>Shift</kbd> while clicking to add or
remove individual units from the selection. You can also drag a selection
rectangle over the canvas; hold <kbd>Shift</kbd> to toggle the enclosed units
without replacing the current selection.

Right-click any unit in a multi-selection to open the selection menu. From
there you can align all selected units horizontally or vertically, remove them
from this plan, or delete them from the project. <kbd>Delete</kbd> or
<kbd>Backspace</kbd> also deletes the selected units after confirmation.

### Removing units from plans

To remove a unit from a plan, use the `Remove from this plan` context menu
action.

> **Remove and delete are different**
>
> `Remove from this plan` only removes the markers from the current plan.
> `Delete` removes the units and their components from the whole project and
> from every plan.

## Managing plans

### Renaming plans

To rename a plan, use the context menu of its sidebar item (`Rename` action).

### Reordering plans

To reorder plans, use the `Move up`/`Move down` actions of the plan sidebar
items, or drag and drop them to the desired position.

### Deleting plans

To delete plans, use the `Delete` action of their respective sidebar items
context menus.