Essentials

SysIDE Modeler activates when .sysml or .kerml file is open, providing features that helps you write, edit, validate and visualize SysML v2 models.

Learn about:


Example Model: copy this model into your .sysml file to test out the features of SysIDE Modeler, or use your own model.

package 'Part Tree Example' {
    part def Electrical {
        doc /*
             * Electrical parts have this documentation
             */
    }

    part def Mechanical;

    part Automobile {
        part 'Drive Train' {
            part Battery : Electrical;
            part Motor : Electrical;
        }

        part Chassis {
            part Suspension : Mechanical;
            part Body : Mechanical;
        }
    }
}

Semantic Highlighting

Whenever a .sysml or .kerml file is open, SysIDE Modeler is active. In light-theme, highlighted textual notation should look like this:

Semantic highlighting

SysML v2 keywords – such as package, part or def – are highlighted in pink. If a part is given a name that is also a reserved keyword in SysML v2, such as frame, two things will happen:

  1. The word frame will be highlighted.

  2. The editor will show a red underline and highlight, indicating an error, together with an error message.

Additionally, SysIDE Modeler highlights Definitions and Usages in distinct colors, enhancing the ability to quickly identify various semantic elements.

Documentation on Hover

SysIDE Modeler understands links between SysML v2 elements and uses this to provide documentation on cursor hover. This is useful for quickly accessing information about a certain model element without having to necessarily navigate to it. Try it out by hovering over the word Battery in the example model – a tooltip like this appears:

Hover info

SysIDE Modeler takes the documentation (the doc keyword) from either:

  1. The focused element, if it has any documentation defined;

  2. The first (most specific) explicitly or implicitly specializing type that has documentation.

If the element or specializing type has multiple documentations, they will be grouped together.

Folding

Use folding to hide nested elements and make large models more manageable. Hover next to any element to reveal the fold arrow:

Folding arrows

Click the arrow to fold/unfold the element. You can also use the Command Palette Ctrl+Shift+P on Windows/Linux, Command+Shift+P on MacOS to find the ‘Toggle Fold’ command and its keyboard shortcut.

Source code after folding

Auto Completion

SysIDE Modeler provides intelligent code completion for both SysML v2 keywords and your model elements. To try it out:

  1. Start typing “pack” to see keyword suggestions

  2. Press Tab to accept a suggestion

Auto completion of a keyword

When importing elements, the editor suggests existing package names and automatically adds the required quotes:

Auto completion of a non-keyword

Auto Formatting

SysIDE Modeler can automatically format your model to maintain consistent style. To enable automatic formatting:

  1. Open settings with Ctrl/Cmd+Comma

  2. Search for “Editor: Format On Save” and enable it

  3. Set “Files: Auto Save” to “afterDelay”

You can also format selected code by right-clicking and choosing “Format Selection”. The formatter preserves your custom formatting conventions while ensuring consistent style across the model.

Validation

SysIDE Modeler continuously validates your model as you type. Try copy-pasting this example after your model into the same file:

package Test {
    import 'Part Tree Example';
}

The editor will show an error because Test is not a valid package name. Hover over the red underlined text to see the error message:

Validation error

The tooltip informs about import not having explicit visibility. In old SysML v2 specifications, this would have been a perfectly fine model. However, since the 2024-09 version of SysML v2, this is considered an error. To comply with specification, add private before import. SysIDE Modeler once again checks the model for errors automatically but does not find any this time.

Visualization

To visualize your currently open .sysml or .kerml file, you have three options to do so:

  1. Keyboard shortcut: Ctrl+Shift+V for Windows/Linux, Command+Shift+V for MacOS

  2. Command Palette: Press Ctrl+Shift+P for Windows/Linux, Command+Shift+P for MacOS and search for “SysIDE Modeler: Visualize current file”

  3. UI Button: Click the SysIDE logo in the top-right corner and select “Visualize current file”

Here is an example of Modeler in action:

Visualization of the example model

Note

The visualization requires manual refresh when the model changes. When refreshing, any customizations (such as element layout or visibility settings) will be reset.

Controls

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

  • Tabs (Red): The top-most panel containing tabs “Diagram”, “Full Model”, and “All Objects”.

  • View Tools (Blue): The lower panel below it containing tools such as “Select”, “Zoom”, “Pan”, “Zoom in”, “Zoom out” and “Fit to screen”.

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

We will now go over each of these panels and functionalities.

Tabs

The top panel provides three different views of your model:

  • Diagram - The standard SysML v2 diagram view with full access to Context tools. This is the primary working view.

  • Full Model - Shows the abstract syntax tree, including additional elements like documentation blocks and their relationships.

  • All Objects - A comprehensive table view of all model elements and relationships, including unnamed elements. Primarily used for debugging.

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 (use with caution on large models)

  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 (use with caution)

  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

Different Visualization Modes

SysIDE Modeler has three different visualization modes:

  • Standalone - treats each file as a standalone model. This mode is useful for small models that fit into one file. However, when the model is split into multiple files, this mode might not be able to show some elements correctly and will instead show them as <placeholder>.

  • Folder (this is the default mode) - treats all the SysML files in the current folder (and its subfolders, like you see on the VS Code explorer view) as a single model. This mode fixes the issue of some elements showing up as <placeholder>. However, this mode still visualizes only a single file, which means that you will not see elements from other files.

  • Project (upcoming feature) - will work similarly to the Folder mode, but will allow your project to span multiple folders. This would be useful e.g. if you have many SysML libraries imported into your project that do not necessarily live in the same folder that you have opened in VS Code. The limitation of only being able to visualize a single file will still apply.

You can change the visualization mode by looking at the bottom of your VS Code window, where you should find a SysIDE logo with “Mode: Folder” written next to it. Clicking on it will open a quick pick dialog where you can select the desired mode.

Mode selection. The button is highlighted in red.

What’s Next?

You’ve now learned the essential features of SysIDE Modeler. If you have any questions/suggestions, feel free to visit our Forum. To continue:

  • Explore Automator to learn about automation and scripting features