Import and export

Bring a flowchart in from a Mermaid or PlantUML file, and take it out as an image or Mermaid code.

This page covers getting a flowchart into Penna from a file or from PlantUML, and getting it out again.

Import a file

  1. In the Diagrams panel, open New diagram (the + button).
  2. Choose Import flowchart file….
  3. Pick a .mmd, .mermaid, .puml, .plantuml or .txt file.

The file becomes a new chart, named after its title or, without one, the file. A .puml or .plantuml file is read as a PlantUML activity diagram. So is any other file that looks like one. Anything else is read as Mermaid.

If the file has no steps in it, or a line can't be read, the app says so and imports nothing.

What a PlantUML activity diagram becomes

The app reads PlantUML's current activity syntax, the one that starts with start and writes actions as :Check order;.

PlantUMLIn the flowchart
:Action;A process step
:Action| or :Action/An input or output
:Action]A subroutine
:Action> or :Action<A flag
#pink:Action;A step in that colour
startUML's start dot
stop or endUML's end
if, elseif, else, endifDecisions, with their answers on the arrows
switch and caseA decision with a way out for each case
while and endwhileA decision with a loop back
repeat and repeat whileA loop back to the first step, with a decision at the end. backward adds a step on the way back.
fork, fork again, end forkFork and join bars
end mergeThe paths meet at the next step, with no join bar
split, split again, end splitPaths that split from the step before, with no bars
-> label;A label on the next arrow
-[#red,dashed]->The next arrow's colour and line. dashed or dotted is dotted, bold is thick and hidden is hidden.
|Lane| swimlanesFrames
partition, group, package, rectangle, cardFrames, which can nest
titleThe chart's title
breakEnds the path

Some things have no place in a flowchart: notes, kill, detach, and settings and styling such as skinparam, legend, header and footer. The app leaves them out. A message after the import names what it left out.

PlantUML's old activity syntax, with (*) -->, isn't read. The app asks you to write it the new way.

Paste PlantUML into the code

You can also paste a PlantUML activity diagram straight into the Mermaid pane. The app rewrites it as Mermaid and says what it left out.

If you type PlantUML rather than paste it, the pane offers a Convert from PlantUML button instead, so the text doesn't change while you type.

The assistant and a connected AI app take PlantUML activity text the same way. Give it the PlantUML and it writes the chart in Mermaid.

Export a file

Open Export at the top right of the chart.

ChoiceWhat you get
SVG or PNGA picture of the chart
Copy as imageA picture on your clipboard
MermaidThe code as the Mermaid pane has it, as a .mmd file
Mermaid fileA .mmd file the app writes from the chart. ⇧ ⌘ E (Shift Ctrl E) downloads it.
Copy MermaidThe code on your clipboard
View Mermaid…The code, read-only, with a button to copy it

Any Mermaid tool opens the .mmd file as it is. For the image options, such as the PNG size and theme, see Export.

On this page