# 6 · Exporting & reports

When you want to *share* what you see — a picture for a slide, a document for review, or a versioned
snapshot — use the **Export** menu.

---

## Export a diagram

From the **Export ▾** menu on the toolbar:

- **Export PNG** — a raster image of the current diagram at 2×, using your saved layout. Good for slides
  and chat.
- **High-resolution PNG** — the same picture at 4× (twice the width and height), with `@4x` in the
  filename. Pro.
- **Model report** — a self-contained HTML report of the whole model, opened in a new window.
- **Save as PDF** — opens that report in your browser's print dialog set to *Save as PDF*. ASysT uses the
  browser's own print engine, so nothing extra is bundled and you get a clean, printable page.
- **Baseline (.zip)** — a versioned snapshot bundle: the report plus every source file and the manifest.

**SVG is headless-only** — there is no SVG item in this menu. Render one with `./asyst.cmd export`, below.

Exports reflect **the view you arranged** — the same boxes, in the same places.
PNG and baseline export open your browser's native **Save As** dialog so you choose the destination and
filename; action-log Save follows the same rule. PDF uses the browser's print/save dialog. On a browser
without native file-picker support, these commands fall back to the normal Downloads behavior.

## Publish a report

**Export ▾ → Report** opens a **self-contained HTML report** in a new window:

- Model identity + version, element/relation counts.
- The **diagram** (inline, using your layout).
- A **requirements table** — each requirement with what satisfies / verifies it.
- An **element index**.

The report has a **Save as PDF / Print** button, so it doubles as your PDF deliverable. For a multi-file
model the report spans the whole model; for a single file it covers that file.

## Archive a baseline

**Export ▾ → Baseline** lets you place a **`.zip` bundle** containing the HTML report **plus every source `.sysml`
file** and the model manifest, named `<model>-baseline-<timestamp>.zip`. That's a complete, archivable
snapshot of the model at a point in time — the "dump of the project" you can file away or attach to a
release.

## Headless / scripted export

You don't need the app open to render a diagram. The engine exposes an **export endpoint**, and there's a
`./asyst.cmd export` command that wraps it (starting the backend if needed):

```bash
# render a model to SVG
./asyst.cmd export path/to/model.sysml -o model.svg

# a specific part's internal structure, or a named sequence diagram
./asyst.cmd export model.sysml --context Car      -o car-ibd.svg
./asyst.cmd export model.sysml --sequence OrderFlow -o order.svg

# render every model under a folder
./asyst.cmd export --all Demo -o build/diagrams
```

This is ideal for generating figures in CI or keeping documentation images up to date. Full options are
in the [API reference](07_API_reference.md#diagram-export).

For exact canvas parity, the public HTTP API separates the model view from its saved presentation:

```bash
curl "http://localhost:8080/api/export?file=E:/models/System.sysml&view=teachingView&rendering=System/Teaching/teachingView/view/docs&packageOverview=true" -o teaching-view.svg
```

Here `view` chooses SysML content, `rendering` chooses the named coordinates/colours/routes, and
`packageOverview=true` keeps the owning package around its cards. See
[Rendering automation](07_API_reference.md#rendering-automation) for schema discovery, direct layout
editing and the difference between a QA capture and an export.

---

That's the tour. For scripting ASysT end-to-end — export, search, validate, variants — see the
[API reference](07_API_reference.md).
