Diagram Model Reference
Diagram
Section titled “Diagram”A diagram is a visual view of model elements.
| Field | Type | Description |
|---|---|---|
| name | String | Display name |
| description | String | Optional description |
| parentId | Reference | Parent element (for child diagrams) or parent package |
| projectId | Reference | Project scope |
| notationPackageId | Reference | The M2 metamodel providing notation |
| viewport | Object | Pan and zoom state |
| showStereotypes | Boolean | Whether stereotypes are visible |
| audit | Object | Timestamps |
Viewport
Section titled “Viewport”| Field | Type | Description |
|---|---|---|
| panX | Number | Horizontal pan offset |
| panY | Number | Vertical pan offset |
| zoom | Number | Zoom level (1.0 = 100%) |
DiagramNode
Section titled “DiagramNode”A visual representation of an element on a diagram.
| Field | Type | Description |
|---|---|---|
| diagramId | Reference | The diagram this node belongs to |
| elementId | Reference | The model element being displayed |
| x | Number | Horizontal position (pixels) |
| y | Number | Vertical position (pixels) |
| width | Number | Node width (pixels) |
| height | Number | Node height (pixels) |
Nested Nodes
Section titled “Nested Nodes”When a node is nested inside a parent node, its position is relative to the parent. The parent auto-resizes to contain all children.
Formatting Overrides
Section titled “Formatting Overrides”A node can carry per-diagram appearance overrides that take precedence over its M2 notation. Colours are { light, dark } pairs; a missing side falls back to the M2 notation for that theme. All fields are optional.
| Field | Type | Description |
|---|---|---|
| fillColor | Colour pair | Fill colour |
| borderColor | Colour pair | Border colour |
| textColor | Colour pair | Text colour (name, stereotype, compartments, icon, outside label) |
| borderWidth | Number | Border width in pixels (1–4) |
| borderStyle | String | solid, dashed, dotted or none |
| shadow | Boolean | Drop shadow on or off |
| textHAlign | String | left, center or right |
| textVAlign | String | top, middle or bottom |
See Appearance settings for how these relate to the M2 notation.
DiagramEdge
Section titled “DiagramEdge”A visual representation of a relationship on a diagram.
| Field | Type | Description |
|---|---|---|
| diagramId | Reference | The diagram this edge belongs to |
| sourceNodeId | Reference | The source DiagramNode |
| targetNodeId | Reference | The target DiagramNode |
| relationshipId | Reference | The model relationship (optional for unlabeled edges) |
| label | String | Optional display label |
| waypoints | Array | Manual bend points |
| lineStyle | String | The edge’s routing: direct (default), custom, lateral-vertical, lateral-horizontal, tree-vertical or tree-horizontal |
Formatting Overrides
Section titled “Formatting Overrides”An edge can carry per-diagram appearance overrides. All fields are optional.
| Field | Type | Description |
|---|---|---|
| lineColor | Colour pair | Line colour; filled arrowheads follow it |
| labelColor | Colour pair | Colour of every text on the edge (name, roles, multiplicities, property values) |
| lineWidth | Number | Line width in pixels |
| linePattern | String | Dash pattern: solid, dashed or dotted. Not the same as lineStyle, which is the routing |
Waypoints
Section titled “Waypoints”Waypoints are manually placed bend points that control edge routing.
| Field | Type | Description |
|---|---|---|
| x | Number | Horizontal position |
| y | Number | Vertical position |
Waypoints are stored as an ordered array. The edge routes from the source node through each waypoint in order to the target node.
ViewLink
Section titled “ViewLink”A view link is a link on a diagram to another diagram, a catalog or a board. It belongs to the diagram, like a node’s position. It is not a model element: it has no type, it does not appear in the Explorer, catalogs or element counts, and it is not part of an XMI or Ecore export.
| Field | Description |
|---|---|
| Diagram | The diagram the link sits on |
| Target | Exactly one diagram, catalog or board, in the same project |
x, y, width, height |
Position and size on the canvas |
label |
Optional. Shown in place of the target’s name |
border |
Optional. Draws the link as a bordered tile |
- A link shows its target’s current name unless it has a label, so renaming the target updates every link to it
- A diagram cannot link to itself
- A link never outlives its target: deleting a diagram, catalog or board removes the links to it
- Links are drawn above nodes and take no part in relationships, nesting or stacking order
See How to link from a diagram to another view.
Diagram Lifecycle
Section titled “Diagram Lifecycle”- Creation — diagrams are created in a package or as a child of an element
- Editing — node positions, edge waypoints, formatting and view links are modified on the Canvas
- Save — explicit save (Ctrl+S) persists layout changes. Model changes (element creation, property edits) are saved automatically.
- Undo/Redo — layout changes within a diagram can be undone and redone until saved