toro4n Open toro4n

Guide Export

Export to Cypher, JSON, SVG, and PNG

Click Export in the top bar (⌘E, or Ctrl+E on Windows and Linux) and pick a format. Cypher gets your model into Neo4j, JSON saves it as a toro4n file, and SVG and PNG give you images for documents and slides.

Hidden layers

In the Export dialog, Visible layers only is on by default, so anything in a hidden layer is left out, including your notes when the Notes layer is hidden. Hiding the Properties layer affects only SVG and PNG, because Cypher and JSON always include your properties. Turn the option off to export everything.

Cypher

Starting fresh? Choose Full script to set up your model in Neo4j with sample data. Already have your data? Choose Constraints only to get just the constraint statements. Running them again changes nothing.

Full script opens with your constraints, each a CREATE CONSTRAINT … IF NOT EXISTS statement written for the node's first label or the relationship's type. A Unique property gets REQUIRE … IS UNIQUE, and a Required property gets REQUIRE … IS NOT NULL. Properties with Key constraint checked on the same node or relationship are combined into a single statement: REQUIRE (…) IS NODE KEY on a node, or IS RELATIONSHIP KEY on a relationship. A key constraint already makes each of its properties required, so the script leaves out separate existence constraints for them. When a Unique property is the only property in a key constraint, the script also leaves out the separate uniqueness constraint, since the key constraint already makes that property unique. Existence and key constraints need Enterprise Edition or Aura. The script then creates your nodes and relationships.

Each property's example becomes its value, written to suit the property type: date("2024-05-01") for a DATE, 42 for an INTEGER, true for a BOOLEAN. An example that doesn't fit its type is written as a string. If a property has no type, we infer one from its example. A property with no example gets its type name as a placeholder string, such as "INTEGER". Since a property type constraint (IS :: INTEGER) would reject those placeholders, the script never adds one.

We never change the value of an example you typed, but we shape anything you haven't filled in to fit the script's constraints. When an existence or key constraint on a label requires a property, every node with that label gets it, even a node that doesn't list it. Relationship types work the same way. When a uniqueness or key constraint needs distinct values, the placeholder strings are numbered ("STRING", "STRING 2").

JSON

Choose toro4n to get a JSON file that holds your model: nodes, relationships, notes, layers with their visibility and locks, the model style, and the model's name. File › Save as file… always saves the whole model, and File › Open… opens the file again. You can also import it into the model you have open. The file records when the model was created and last changed, but nothing that identifies you.

Using Neo4j Data Importer? Choose Neo4j Data Importer instead to get a JSON file with your nodes, relationships, and properties, ready to open there.

SVG and PNG

Images use the same font as the canvas and include everything that's drawn, from borders and labels to properties and relationship types, with a margin around it all. For a sharper PNG, choose a higher Resolution. Turn on Transparent background to leave out the background color. In Demo mode, the image shows your demo board, not the model you had open.

Preview what an image will include

To see what an image will cover, click Zoom to fit in the zoom bar or press 0.

Related