Skip to content
Documentation
Updated 5 minutes to read
Markdown

Import brings C4 diagrams into a Diagram Set from four source formats. This page lists what each format may contain. The wizard, the entity matching and the resolution choices are on the Import page.

  • ✅ Mermaid C4, the native format
  • ✅ PlantUML C4, normalized to Mermaid before parsing
  • ✅ Structurizr DSL, a C4-focused subset
  • ✅ Draw.io XML, with the metadata you confirm yourself

Mermaid is the native format. Paste standard Mermaid C4 markup with a top-level diagram type declaration. Blank lines and %% comments before it are skipped.

  • C4Context
  • C4Container
  • C4Component
  • C4Deployment
  • C4Dynamic
Category Macros
Person nodes Person, Person_Ext
System nodes System, System_Ext, SystemDb, SystemDb_Ext, SystemQueue, SystemQueue_Ext
Container nodes Container, ContainerDb, ContainerQueue, Component, ComponentDb, ComponentQueue, Container_Instance (and _Ext variants)
Boundaries Container_Boundary, System_Boundary, Enterprise_Boundary, Boundary, Deployment_Node
Relationships Rel, Rel_D, Rel_U, Rel_L, Rel_R, Rel_Back, Rel_Neighbor, BiRel

For the shape each macro produces per diagram type, see Shapes and Toolbox.

  • title — sets the diagram title
  • UpdateRelStyle(a, b, $lineStyle="dashed") — draws that relationship dashed; any other UpdateRelStyle is skipped with a warning
  • UpdateLayoutConfig, UpdateElementStyle — recognized and skipped with a warning (not a parse error)

Import a C4-PlantUML source of the Order-to-Cash context into a C4 Diagram Set: PlantUML, paste, Level filled from the include, Scope Portal, Resolve All, Import, and open the diagram, animated walkthrough (7.13)
Animated walkthrough: a PlantUML source goes through the same wizard as Mermaid. The preview shows the Mermaid the server made of it.

PlantUML C4 is accepted and normalized automatically before parsing:

  1. @startuml and @enduml tags are stripped
  2. !include and !pragma lines are removed
  3. The diagram type is inferred from the C4-PlantUML file the !include names: C4_Context, C4_Container, C4_Component, C4_Deployment, or C4_Dynamic (e.g., !include <C4/C4_Context> or !include C4_Context.puml → C4Context). Without such an include, the diagram is a Container diagram
  4. New 7.13 Layout and legend macros (LAYOUT_…, SHOW_…, HIDE_…) are removed; tag and style macros (AddElementTag, AddRelTag, UpdateBoundaryStyle, UpdateLegendTitle, Set…) are removed with a warning; Rel_Up, Rel_Down, Rel_Left, and Rel_Right are read as Rel_U, Rel_D, Rel_L, and Rel_R; the title line becomes the diagram title
  5. Mermaid-equivalent C4 keyword is prepended, then the standard Mermaid parser processes the result

Standard C4-PlantUML macros (Person, System, Container, Boundary, Rel) work as-is after normalization. Non-C4 PlantUML constructs outside this normalization path may fail to parse.

Import a Structurizr DSL workspace of the Order-to-Cash context into a C4 Diagram Set: Structurizr DSL, paste, Level filled from the view, Scope Portal, Resolve All, Import, and open the diagram, animated walkthrough (7.13)
Animated walkthrough: the same import from a Structurizr DSL workspace. The workspace name fills Diagram Name.

A C4-focused subset of Structurizr DSL is supported:

  • workspace, model, and views blocks
  • person and person_ext
  • softwareSystem: with a { … } block it becomes a boundary around its containers; without one, a System
  • container
  • deploymentEnvironment, nested deploymentNode, containerInstance, and softwareSystemInstance, imported as a Deployment diagram
  • Relationships declared as src -> tgt "Label" "Technology"; New 7.12 the technology is read (and exported) with the Message Type after /
  • view declarations — used to infer the diagram type: systemLandscape, systemContext, container, component, deployment, dynamic. With several views, the most detailed wins (Component, then Deployment, Dynamic, Container, Context, System Landscape); without one, the diagram is a Container diagram
  • The workspace name (workspace "Name" or name "Name") fills Diagram Name

Import a Draw.io file of the Order-to-Cash context into a C4 Diagram Set: Draw.io XML, paste, pick the Level Context by hand, Scope Portal, Resolve All, Import, and open the diagram, animated walkthrough (7.13)
Animated walkthrough: the Diagram Name comes from the page name, and Next waits until you pick a Level.

Draw.io XML from draw.io / diagrams.net is supported as an import source. The importer reads labels, shapes, boundaries, and connectors from the XML and feeds them into the same validation and entity-resolution flow used for the text-based formats:

  • A shape's label holds the name on the first line, the type on the second (System, Person, Container, Component, Service, External System, and a set of Azure and partner labels), and a description after that. An unknown type becomes a System, with a warning.
  • Boundaries come from nesting, or from large shapes that contain others.
  • Only the first page is read, and the root must be <mxfile>. Compressed pages are read.
  • Draw.io-only options: Preserve original positions and sizes from Draw.io (off by default) and Split flow labels into separate relationships on a new line (on by default), a comma, or a semicolon.

Before continuing from the Draw.io XML tab, review these fields:

Field Why you review it
Diagram Name Filled from the page name (<diagram name="…">), which may only be a tab label
Level / Diagram Type Draw.io XML does not encode C4 intent, so the Level stays empty and Next stays disabled until you pick L0, L1, L2, L3, Dynamic, or Deployment. A file exported from Nodinite carries its level
Diagram State Starts at Draft, as for every format; change it if you need to

...

Version:
Release date: N/A
Loading...

Explore Nodinite for 30 days – completely free

  • Find out why this is the leading O&M software
  • Prove your business case
  • Test the self-service for the business side

Loading...

See how Nodinite resolves your technical issues, in a LIVE Demo!

Once you submit this request:

  • We will give you a short call to understand the issues you want to tackle.
  • Understand solutions you have tried and why were you not happy with them.
  • Book a convenient slot for a LIVE demo!

Loading...