Use diagram panels

New in v0.11.0

A diagram opens in a panel beside the model it came from. What it draws can be a single element, a whole file, or a view, depending on the entry point you used: see Open a diagram for the three of them. This page covers what the panel offers once a diagram is on screen, which is the same whichever of the three it came from. For writing views, see Select what a diagram shows and Configure diagram views.

Controls

The controls a diagram panel offers depend on the engine that rendered it. Select the tab for the engine you are using.

Drag with the left mouse button to pan the diagram, and scroll to zoom. The toolbar in the corner of the panel holds the rest:

The visualization panel toolbar.
  • re-renders the diagram from the saved file

  • writes the diagram as an image, see saving a diagram

  • copies a command that reproduces the diagram on the command line, see syside viz

  • and zoom by a step, and fits the whole diagram in the panel

The engine renders the diagram as a picture: elements are not selected, moved, hidden or drilled into in the panel, and what it draws is decided by the element, file or view you visualized. Select what a diagram shows covers how a view states what to include, and SysML v2 diagram coverage lists the notation the engine supports.

Diagram type and layout

The Diagram picker chooses the kind of diagram: General, Interconnection, Action flow, State transition or Sequence. The Layout picker arranges children as a tree or nested inside their parents. Changing either re-renders the element, and both choices are kept when the diagram is refreshed or saved.

The Diagram and Layout pickers.

Both pickers apply to single-element visualizations only. They are greyed out for a view, which states its own diagram type and layout in the model, and for a whole file, where neither applies.

Saving a diagram

asks for a name and location first, then renders: the format follows the extension you choose, one of .svg, .png or .jpg. Once the file is written, the notification names the full path and offers Open.

A saved diagram uses the light theme, while the panel follows your VS Code color theme. A [viz.style].theme set in syside.toml overrides both. The rest of the [viz] settings apply to these diagrams as well as to the command line, see Visualization settings.

Here is an example of Modeler in action:

Visualization of the example model

Note

Refreshing resets any customizations, such as element layout or visibility settings.

In the diagram view, you can find many different controls that help you navigate and interact with the model. They are organized into two different panels:

  • View tools (Blue): The horizontal panel at the top containing tools such as “Select”, “Zoom”, “Pan”, “Zoom in”, “Zoom out” and “Fit to screen”.

  • Context tools (Red): The right-side panel containing tools such as “Show descendants”, “Remove element”, and “Go to source”.

View tools

The View Tools panel provides navigation and layout controls for your diagram. Controls are arranged left to right:

View tools.
  1. Save As Image - Export current diagram as an image file

  2. Select - Select elements (blue highlight). Multi-select with drag or Ctrl/Command+click

  3. Pan - Move diagram view with left mouse button

  4. Navigate links - Click connections to jump between elements

  5. Marquee zoom - Zoom to area by drawing rectangle

  6. Interactive zoom - Zoom in/out with mouse up/down

  7. Zoom fit - Adjust view to show entire diagram

  8. Overview - Toggle mini-map for navigation in large diagrams

  9. Hierarchical Layout - Arrange diagram in tree structure

  10. Orthogonal Layout - Arrange diagram in orthogonal structure

  11. Global Layout - Auto-arrange entire diagram

  12. Incremental Layout - Auto-arrange while preserving relative element positions

  13. Search - Find and navigate to diagram elements

Also, double-clicking on white space inside of an element (outside of the name box) will “drill down” into it. Similarly, double-clicking on the white space outside of the element moves the view back up one level.

Context tools

The context tools panel provides element-specific operations for diagram manipulation. On macOS, it appears on the right side of the screen; on Windows and Linux, access it by right-clicking an element.

Context tools.
  1. Load Children as Tree - Display immediate children of selected elements

  2. Load All Descendants as Tree - Display all descendants (depends on model complexity, use with caution on large models with 10k+ rows of code)

  3. Load Children as Nested Tree - Display immediate children in nested format

  4. Load All Descendants as Nested Tree - Display all descendants in nested format (depends on model complexity, use with caution on large models with 10k+ rows of code)

  5. Remove Selected - Hide selected elements (preserves descendants)

  6. Remove All Descendants - Hide descendants of selected elements

  7. Remove All - Clear all elements from the diagram

  8. Go To Source Definition - Jump to and highlight element definition in model file

The viewer requires Java, and Modeler detects it automatically. See Tom Sawyer SysMLv2 Viewer if it is installed somewhere Modeler does not find it.