# Place equipment drawings and import SVG files

> Use the Assets tab of the 2D screen designer to place equipment drawings in the Simple or Detailed style, colour them by a state tag, and import your own SVG drawings into the project.

Product: eaxScada · Type: How-to guide · Editions: Starter
Source: https://eaxware.com/docs/eaxscada/how-to/equipment-drawings-and-svg-import/
Status: migrated page, not yet verified against the current code.

The **Assets** tab of the 2D screen designer holds equipment drawings you
place on a screen: pumps, compressors and fans, valves, vessels and tanks,
heat exchangers, conveyors, motors and gearboxes, instruments and piping
fittings. The drawings are part of eaxScada (no separate licence). Under
**Project assets** you find the SVG drawings imported into the project.

## Place a drawing

1. Open a screen in the designer and choose the **Assets** tab in the left
   sidebar (or the image button of the collapsed sidebar).
2. Type in the search box to narrow the list, for example `valve` or
   `tank`. The search works like the palette's: every word must start a word
   of the drawing's name or keywords.
3. Under **Place as**, choose **Simple** or **Detailed**.
4. Click a drawing, then click the canvas (or drag out a box to give it a
   size). You can also drag the drawing onto the canvas.

With the keyboard: the arrow keys move through the drawings, **Enter**
places the one with the focus, **Escape** clears the search and returns to
the canvas.

A drawing keeps its proportions at any size, and its lines keep their width.
It is drawn as vector shapes, so it stays sharp at any zoom.

## Choose the style

Select the drawing and change **Style** in the inspector:

| Style | Look | States |
|---|---|---|
| **Simple** | Grey line art (ISA-101 high-performance). | Stopped: outline only. Running: filled grey. Fault: red. Transition: amber. |
| **Detailed** | Shaded drawing. | Stopped: steel grey. Running: green. Fault: red. Transition: amber. |

In the inspector you can also pick another **Drawing**, show the object's
name under it, and set **Fill** and **Stroke**: they replace the style's
colours of the body until a binding sets a state.

## Colour a drawing by its state

On the **Bind** tab, bind one of:

- **Operating State**: 0 stopped, 1 running, 2 fault, 3 transition. Any
  other value is shown as unknown (grey, dashed outline).
- **Running Boolean**: true is running, false is stopped.
- **Body Color** or **Border / Outline Color**: a colour from a tag or an
  expression.

The state colours the drawing's body and its accent part (impeller,
actuator, display). A value with **Bad** quality is shown grey with a dashed
outline and the quality marker, never in the colour of the last good value.
An **Uncertain** value keeps its colour, with a dashed outline and the
amber quality marker.

## Import SVG drawings

1. In the Assets tab, choose **Import SVG**.
2. Choose or drop one or more `.svg` files (at most 512 KB each).
3. Choose **Import**. Each file gets a line saying whether it was imported,
   imported after cleaning (with what was removed), or refused and why.

Import only drawings you have the right to use: the licence of an imported
drawing is your responsibility.

The server checks and cleans every file before it is stored. It keeps the
shapes, gradients, clip paths, text and simple style rules, and removes
anything that could run or load something: scripts, event handlers
(`onload`, `onclick`...), embedded pages (`foreignObject`), pictures,
links, animations, and references to other files or to `data:` and
`javascript:` addresses. Files with a `DOCTYPE` or `ENTITY` declaration,
files that are not SVG, have no size (`viewBox`, or `width` and
`height`), or are too complex are refused. A drawing is cleaned again each
time it is served.

Imported drawings appear under **Project assets** and are placed like the
built-in ones. They keep their own colours; a state binding shows as a
frame around the drawing (red for fault, amber for transition, grey and
dashed for unknown or Bad).

Importing, renaming and deleting a drawing needs the right to edit screens
(engineer role or higher). Every user who can open a screen sees the
drawings placed on it. Each import, rename and delete is recorded in the
audit trail under the category `SVG_ASSET`, with the user.

## Rename or delete an imported drawing

Point at the drawing under **Project assets** (or move the keyboard focus to
it) and choose the pencil to rename it or the bin to delete it. Delete asks
first. A drawing still placed on a screen or a component is not deleted: the
message names where it is used.

The files are kept in the server's work directory under
`data/studio/assets/svg/`, next to the project fonts and the 3D library.

## Screens from earlier versions

Screens made with the six asset types of earlier versions (gate valve,
centrifugal pump, conical tank, heat exchanger, motor, pressure
transmitter) still open: these objects are now drawn with the new
drawings, in their original size.
