Skip to content

Export diagrams

Draw a View as a picture, styled like the viewer: SVG for docs and wikis, PNG for slides and chat.

  • archidocs check passes on the Workspace. See the Quick start.
  • You know the View’s id: a Generated View such as c2, or a Saved View’s Qualified id. See Views.

Name the View:

Terminal window
archidocs export c2
Wrote c2.svg

Add --format png for a PNG, and --out to choose the file:

Terminal window
archidocs export payments:make-a-payment --format png --out make-a-payment.png
Wrote make-a-payment.png

The viewer also downloads the View on screen as SVG or PNG. Use export when the picture should be rebuilt from the Model, in CI or a docs build.

Terminal window
archidocs export --all-saved --out views
Wrote views/digital-mainframe-outage.svg
Wrote views/digital-prod-deployment.svg
Wrote views/digital-sign-in.svg
Wrote views/digital-sign-in-path.svg
Wrote views/payments-make-a-payment.svg

Each file is named by the View id, with : and / turned into -. The Action’s images input publishes the same files. See Publish Saved View images.

Add the flags the picture needs. For a dark slide, draw it in the viewer’s dark palette, laid out left to right:

Terminal window
archidocs export c2 --theme dark --direction LR --out c2-dark.svg
Wrote c2-dark.svg

Every flag, such as --label for the line under the title, is in the archidocs export reference.

Open the file. It shows the View as the viewer draws it, such as this Dynamic View of the Kitchen sink:

The Kitchen sink's Customer places an order: a sequence chart with a call, a derived edge, an event through the broker and a reply.The Kitchen sink's Customer places an order: a sequence chart with a call, a derived edge, an event through the broker and a reply.
Open in the live viewer ↗

export stops when the id names no View:

archidocs: Unknown View "nope"; Views are c1, c2, c2/<system>, c3/<service with Components>, deployment/<environment> and Saved Views (project:view-id).

Check the id. A Saved View needs its Project, as payments:make-a-payment.

Documents the beta branch at cd98671, ahead of the latest release, v1.4.0.