Exporting a Map view to Graphiz/Dot

I read @trianta’s 2017 off-the-wall request to Export map view to DOT. Would that be doable, and desirable(? and thought: it must be doable! (I completely ignored the desirable part.)

So here we go, a template to export a map view into a dot file that can be converted to PDF using Graphviz: graphiz export.tbx (201.1 KB)
The template has a README note explaining how to use it.

They key things were to use a rule to collect all the outbound links into a string:

$MyString="";
$MyList=links.outbound..$Name;
$MyList.each(x){$MyString = $MyString + '"' + $Name + '" -> ' + '"' + x + '"\n';};

And to use the right templates. First, the parent note:

/* Define global attributes here. */
digraph mygraph {
^children("/Templates/Dot/Dot item")
}

Then the child notes simply export the string value:

^value($MyString)^

Here’s what the Tinderbox map looked like:

And here’s the Graphviz diagram:

My intent was to use Tinderbox to make interrelationship diagrams and Graphbviz to “flatten” them so I can see the dependencies. It works quite well.

4 Likes

Interesting. I tried this a few years back and gave up as Graphviz doesn’t make a complex network more visually clearer/more pleasant to look at.

That’s not to speak ill of Graphviz format where—for those who have OmniGraffle—Graphviz DOT files can be imported into OmniGraffle. Indeed, if exporting for prettifying the map, you might do better to use menu EditCopy View As Image then paste into Adobe Illustrator or Affinity Designer.

Graphviz, alone, will not make a complex map clearer (yes—I tried). I think this worth stating as the PKM app segment is full of apps over-promising to trade process for insight. The victims of that all too often end up here. The result of precess … is being slave to a process—unless the process does exactly what you want. IME, knowledge discovery is a bit less simply than just box-stuffing a process Ui.

†. Personal Knoweldge Management.