Skip to content

Export and import

Shin Sterneck edited this page Nov 8, 2026 · 1 revision

The Export ▾ menu in the toolbar has all of these. From scripts, see Command line.

SVG

A static picture of the diagram (shown layers only), for documents and wikis, in the colors of the theme you work in. With a frame, the frame is the page.

PNG

The same picture as pixels, for chat, tickets, slides and anything that does not take SVG. It is rendered from the SVG export by Qt, so frame, logos and watermark look the same, on a white (or, in a dark theme, dark) background, at 2 pixels per diagram unit (sharp on high resolution screens and in print). Very large diagrams are scaled down to at most 16384 pixels on their longer side.

draw.io

.drawio is an editable diagram for draw.io / diagrams.net, including the Confluence and VS Code integrations:

  • devices become rounded boxes with their colors; the device type is kept as a custom property (Edit Data in draw.io)
  • ports become small squares inside their device, so they move with it
  • links connect port to port, so they stay attached when you move things in draw.io; arrowheads, dash style, width, color, orthogonal routing and labels carry over; lines routed around objects keep their bends as waypoints
  • interface names become labels near the matching end of the link
  • notes become borderless text boxes
  • layers become draw.io layers (hidden ones stay hidden), and the stacking order carries over
  • every sheet becomes a page

How line types and frames appear in draw.io is described in Lines and Frames.

Copy and paste

Copy for draw.io (Ctrl+C on the canvas, or in the Export menu) puts the selection on the clipboard as draw.io shapes; with nothing selected it copies the whole shown diagram. Paste it into draw.io (or diagrams.net, Confluence, VS Code) with Ctrl+V and it arrives as editable shapes in the current layer, with the same styles as the draw.io export. Lines between copied devices come along; a selected line whose device is not selected keeps a loose end there. Hidden layers are left out.

Paste (Ctrl+V on the canvas, or in the Export menu) works the other way too:

  • Stratagram's own copies paste back exactly (ports, names, styles, connection points), 20 px down and right of the original, a step further each time;
  • shapes copied in draw.io become devices (the type is guessed from the shape, e.g. a Cisco firewall icon becomes a firewall), texts, links (with arrows, dashes and routing) and loose ends; groups and layers are flattened;
  • any other text becomes a text note.

Pasted items go into the active layer, in front, selected, as one undo step. Ctrl+X cuts.

Copy sheet with layers and frame (in the Export menu) copies the whole sheet in view, everything on it (hidden layers too), as text to paste into Stratagram: in the same editor, another window, the app or NetBox's Diagram tab, either way. Pasted with Ctrl+V, its items keep their layers (those of the same names, or new ones with the same settings: hidden, locked, name shown, background), and the frame comes along when the sheet has none (a sheet with a frame of its own keeps it). Into an empty sheet it comes as it was, where it was and still standing for the same NetBox objects; into a sheet with things on it, it goes to their right, as copies. One undo step.

Cisco Modeling Labs

Export CML lab… writes the sheet in view as a CML lab topology (YAML, schema 0.2.1, which CML 2.x imports), to build and run the drawn network as a lab.

  • Each device becomes a node by its type: routers (also OSPF router, BGP reflector and the AWS gateways) IOSv, switches IOSvL2, firewalls ASAv, servers and load balancers Ubuntu, clients Desktop, the internet and clouds an external connector (an unmanaged switch when several lines meet there), anything else an unmanaged switch.
  • Each line end gets an interface of its own, named as the platform names it (GigabitEthernet0/0, ens2, port0...). The IOS style platforms start with the device's name as hostname and the drawing's port names as interface descriptions.
  • A line bent through points is one link between its real ends. Tunnels (VXLAN, IPsec, CAPWAP, SD-WAN) and lines to a free point are not cables and are left out (the status line says how many).
  • Text notes become text annotations; hidden layers are left out.

CML must have the node definitions it uses (the reference platforms do).

Opening draw.io files

draw.io files, also those exported by netdiag (Stratagram's earlier name), read back with their line types.

Clone this wiki locally