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
- In the Diagrams panel, open New diagram (the + button).
- Choose Import flowchart file….
- Pick a
.mmd,.mermaid,.puml,.plantumlor.txtfile.
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;.
| PlantUML | In 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 |
start | UML's start dot |
stop or end | UML's end |
if, elseif, else, endif | Decisions, with their answers on the arrows |
switch and case | A decision with a way out for each case |
while and endwhile | A decision with a loop back |
repeat and repeat while | A loop back to the first step, with a decision at the end. backward adds a step on the way back. |
fork, fork again, end fork | Fork and join bars |
end merge | The paths meet at the next step, with no join bar |
split, split again, end split | Paths 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| swimlanes | Frames |
partition, group, package, rectangle, card | Frames, which can nest |
title | The chart's title |
break | Ends 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.
| Choice | What you get |
|---|---|
| SVG or PNG | A picture of the chart |
| Copy as image | A picture on your clipboard |
| Mermaid | The code as the Mermaid pane has it, as a .mmd file |
| Mermaid file | A .mmd file the app writes from the chart. ⇧ ⌘ E (Shift Ctrl E) downloads it. |
| Copy Mermaid | The 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.