Skip to content

Compose a diagram

ModelDesk has two kinds of diagram:

  • Ready-made diagrams that come from your model’s standard. They appear automatically for elements that have them, already filled with the relevant elements. You open them to view, and you can adjust their layout.
  • Custom diagrams that you build yourself. You create the diagram, then drag in exactly the elements you want.

This guide covers building a custom diagram: creating it, adding elements, and arranging them.

  • A model open in the Model editor.
  • A standard that supports diagrams. If your model’s standard defines no diagram type, the Create diagram dialog shows No diagram types available and you cannot create one.
  1. Open the model in the Model editor. At the top of the editor, use the Form / Canvas switch to select Canvas. The canvas appears in the middle, the model tree on the left, and the Diagram settings tab on the right.

  2. Among the controls at the right of the bar at the top, open the view menu (the layers button, labeled with the current view or Select view). Under Custom diagrams, select New diagram (the +). The Create diagram dialog opens.

  3. Complete the dialog, then select Create:

    • Diagram Type: the kind of diagram, taken from your model’s standard. You only see this when your standard offers more than one kind. With a single kind there is nothing to choose, so it is named under the dialog’s title instead, as in the image below.
    • Name: a name for the diagram.
    • Description (optional): what the diagram shows and how to read it. See Describe a diagram.
    • Context: choose Global (always visible) to make the diagram available everywhere, or choose an element to tie it to. A context-bound diagram is shown only when that element (or a descendant) is selected.

    The Create diagram dialog, with the diagram type named under the title and fields for name and context

  4. The new diagram opens empty on the canvas. Drag an element from the model tree onto the canvas to add it. The canvas outlines in the accent color when the element can be added, and in red when its type does not belong on this diagram. Repeat for each element you want.

    • Elements you add are listed under the Elements section of the Diagram settings tab. To take one off the diagram, select the remove icon next to it in that list, or select it in the list and press Delete. This removes the element from the diagram only; it stays in your model.
    • Pressing Delete while an element is selected on the canvas does something different: it asks to delete the element from the model itself, exactly as in the model tree. Cancel that dialog if you only meant to take the element off the diagram.
    • Relations between elements already on the canvas are drawn for you. You do not add them separately.

    A diagram canvas with several elements next to the model tree and the Diagram settings tab

  5. Arrange the diagram with the controls on the Diagram settings tab and on the canvas. Node positions are placed automatically, so you shape the arrangement rather than dragging nodes:

    • Layout direction: on the Diagram settings tab, set the Diagram direction and the Hierarchy direction to top to bottom or bottom to top.
    • Layout rules: select two or more nodes on the canvas (hold Cmd or Ctrl to add to the selection), then use the toolbar that appears above the canvas to place one node relative to the others: same level as, above, below, left of, or right of.
    • Hierarchy groups: select one node, open Diagram settings on the canvas toolbar, and choose Add hierarchy group to stack that element’s children into compact rows.
  6. Select Save layout at the bottom of the Diagram settings tab to keep your arrangement.

Your custom diagram is saved. It appears under Custom diagrams in the view menu, and on the model’s Diagrams page (see below). Reopen it at any time to add or remove elements or to adjust the layout. To rename or delete the diagram, select Edit diagram or Delete diagram in the More actions menu at the top of the Diagram settings tab.

A custom diagram can carry a description: a few sentences on what it shows and how to read it. Write it in the Description field of the Create diagram dialog, or later through Edit diagram in the More actions menu at the top of the Diagram settings tab. A description is one text per language. Choose the language beside the text; each language can be used once, and one text can be left without a language. A text holds at most 4,000 characters. To remove a description, empty its text and save.

The description appears in three places:

  • In the editor, under the diagram’s name at the top of the Diagram settings tab, in your display language, else English, else the text without a language, else the first one written. A long description is held to two lines; select Show more to read the rest.
  • In the generated documentation, in the diagram’s figure, between the drawing and its caption. A screen reader announces it as the description of the diagram. A MIM document is written in Dutch, so it prints the Dutch text, or else the text without a language. A diagram described only in other languages has no description there.
  • In the public catalog, under the toolbar of the diagram pane, in the reader’s language, else English, else the text without a language, else the first one written.

Ready-made diagrams have no description: their content follows from the model’s standard.

All of a model’s diagrams, ready-made and custom, are collected on its Diagrams page. Select Diagrams in the left navigation to open it. The entry appears only for a model whose standard defines diagrams, or that already holds one.

  • The sidebar lists the ready-made diagrams in a group per diagram kind, with one entry for each element that has one. A small dot on an entry means its layout was customized from the template defaults. Your own diagrams are listed under Custom diagrams, each showing the element it is bound to, or Global. A crossed-out eye icon on any entry, labeled Not published, means that diagram is held back from downloads and generated documentation; see Publishing a diagram.
  • Select a diagram to view it. The viewer is read-only: you can zoom and pan, but editing happens in the editor’s canvas view.
  • To save the diagram you are viewing as an image, use the download button in the top-right of the viewer. Select it to save a PNG (its tooltip reads Download as PNG). To choose the format, select the arrow beside it (More download formats), then Download as SVG or Download as PNG. Your browser saves the file as diagram.svg or diagram.png.

The two formats are made differently. The SVG is drawn from the diagram itself: its text stays text and its shapes stay vector shapes, so it stays sharp at any size, and it leaves out selection and hover highlights. The PNG is a picture of the canvas as you see it. So with an element selected, the PNG shows the selection and the SVG does not.

The canvas in the Model editor has the same download button in its top-right corner. The taxonomy diagram, which draws a hierarchy of concepts, is the exception: it has a single Download diagram button that saves a PNG.

To download every diagram at once, select Download all diagrams at the top of the sidebar. The Export diagrams dialog renders all diagrams in the background and shows its progress. When it finishes, select Download ZIP to save them together as one ZIP archive. The ZIP holds each diagram as an SVG and a PNG under the same name, as the dialog notes with Each diagram as SVG and PNG. If some diagrams fail to render, the dialog says so and the ZIP contains the ones that succeeded; a diagram that failed only because its SVG could not be produced is still in the ZIP, as a PNG. If the dialog reports Export expired, select Export again for a fresh download link. Diagrams you have held back are left out of the ZIP; see Publishing a diagram.

Every diagram is published by default, which means it goes out with the model’s generated documentation. Hold a diagram back when it is a working sketch, or when its picture does not belong in a document you share.

Open the diagram in the editor and clear the Published checkbox under Publication in the Diagram settings tab. This works the same for ready-made and custom diagrams. The change is saved on the spot, separately from Save layout: the check mark moves once it is stored. If the save is refused, the section says Could not save. This diagram is unchanged.

You can do the same without opening the diagram. In the sidebar of the Diagrams page, point at a diagram and select the eye icon on its row to hold it back; select the crossed-out eye to publish it again.

Holding a diagram back changes nothing inside ModelDesk. Everyone who can open the model still sees it and can still edit it, the Diagrams page still lists it and opens it, and its download button still saves it as an SVG or a PNG. What changes is what leaves the model. A diagram that is not published is left out of the model’s content bundle, with no figure for it in the generated Markdown, and out of the Download all diagrams ZIP. This holds for ready-made and custom diagrams alike.

A held-back diagram is also absent from the model’s page in the public catalog, and a link to it there reads Page not found. That page follows the setting as it stood at the model’s latest release; see Publish a model.

The setting belongs to the diagram itself, so it is committed and versioned along with the rest of the model. A bundle pulled at a named version contains the diagrams that were published at that version. See Version your model.

Reset to default layout returns a ready-made diagram to the template’s layout and keeps it held back.

  • No view menu or Diagram settings tab. The view menu appears in the canvas view: use the Form / Canvas switch to select Canvas. The Diagram settings tab appears only for a model whose standard defines diagrams, or that already holds one.
  • An element will not drop (red outline). That element’s type cannot appear on this diagram type. Add an element of a type the diagram supports.
  • “No diagram types available” in the Create diagram dialog. Your model’s standard does not define a diagram type, so custom diagrams are not available for it.
  • The canvas is blank after you create the diagram. A new diagram starts empty. Drag elements from the model tree to fill it; the Elements section of the Diagram settings tab confirms what has been added.
  • A message warns of unsaved changes. Layout changes are kept only when you select Save layout. Choose Save and continue to keep them before you switch away. (Adding and removing elements is saved as you go.)
  • A diagram is missing from a content bundle or from the diagram ZIP. Check whether it is held back: open it in the editor and look at the Published checkbox under Publication in the Diagram settings tab. In the sidebar of the Diagrams page, a held-back diagram carries the Not published icon, and the Diagram settings tab shows the same icon beside the diagram’s name while you edit it.