Shape Data in SimpleDiagrams

Let's use a green wall sketch to demonstrate how shape data works in SimpleDiagrams.

By Daniel McQuillen Published 4 minutes read

SimpleDiagrams is meant to be simple. It doesn't (or at least shouldn't) get in your way when you're doing a simple diagram.

However, you should know that SimpleD is nuanced and multifaceted, like a precious gem. Indeed, SimpleD has elegant features you might not know about, because they're intentionally receded and packed away until you need them. One of those features is shape data.

Shape data in SimpleDiagrams

Now for most tasks, you won't need shape data. Your diagrams are probably quick and throwaway. And that's fine. But at some point you might want to attach some extra information to your shapes and keep the diagrams around longer to do more informative work. "Shape data" is a way of attaching meta-data to your shapes: kind, cost, custom options...all kinds of properties.

Shape data provides the mechanism for defining metadata fields in your libraries, and then giving you a way to update and view those fields as you create instances of shapes in a diagram.

For example, you might be sketching out some ideas for your Battery Energy Storage System (BESS) project, and you want to attach kilowatt capacity to your battery rack icons. Or maybe you're a green wall designer and need to keep track of the species and costs of the plants and equipment you're messing around with in your preliminary sketches.

Thanks to SimpleDiagrams' shape data feature, that's not hard at all.

Let's walk through that second example: you're a green wall designer, sketching out some initial ideas. You want to capture some rough estimates on cost and what the materials sheet would look like.

Creating a Green Wall … with Data

To make this example more immediate, I've released a free "Green Wall" library with some preliminary shapes that seemed reasonable to a poser like me. (If I didn't get it right and you're a green wall pro, please contact me. I'm eager to incorporate your suggestions.)

The "Green Walls" library from the SimpleDiagrams online library.

And if you haven't installed SimpleD yet, you can download it here and start a 7-day free trial. (By the way, SimpleDiagrams is only available for MacOS...at least for now).

Now let's get into how we can attach data to shapes.

How Shape Data Works: Three Levels

When it comes to shape data, the library author has the most control. The author decides which fields exist, which ones you, the user, can edit, and at which level you can edit them. There are three places where data can be defined, and they stack on top of each other:

  • Library defaults: The library author defines a field and sets a default value that applies to all shapes in the library. (Example: "Cost" defaults to $50 for all plants.)
  • Shape overrides: For specific shapes in the library, the author can override the library default. (Example: "The rare moss costs $100, not $50."). The author may make these fields read-only, or editable by you.
  • Instance edits: When you drag a shape onto your canvas, you can override that shape's value (if the author allows it). You might say: "I'm using the cheaper moss variety today, so I'm setting price to $30."

Not every field works at every level. The library's author locks or unlocks each shape's data for the library and shape levels, and separately decides, field by field, which values you can change on a shape instance on the canvas. So some fields are read-only everywhere. Some you can change in the library but not on a placed shape, and some the other way round.

Library Shape Data

So now you know that SimpleDiagrams libraries are designed to let the library author decide which shape data fields are read-only, which are editable at the shape level, and which the user can override when creating a shape instance on the canvas.

To see these fields, click the library actions button to the far right of the library name and select "Edit Library" from the drop-down menu.

Screenshot of Green Walls library in SimpleDiagrams library panel.
The "Green Walls" library in the Library panel. The "Library Actions" button is circled in red.

SimpleDiagrams shows you the library edit screen. Click "Library Settings" and then "Shared Fields," and you'll see the shape data fields that are defined for all shapes in the Green Walls library.

Screenshot of SimpleDiagrams
The "Shared fields" tab of the library edit dialog.

If you click any shape in the library (in the shape list on the left), you can see these fields in action. Each shape will show the shared fields as they apply to this particular shape, and allow you to set shape-level overrides.

Screenshot of SimpleDiagrams
Screenshot of SimpleDiagrams
The shape data fields for the Golden Pothos library item.

So now you can see how data can be defined for all library shapes or a particular library shape. Let's look at how data works when you work with "instances" by dragging a library shape onto your canvas.

Instance Shape Data

There are times you will want to set a bit of data on each particular shape you drag into your diagram. In this case, you may want to indicate how much light a particular plant will get in its current position.

Luckily for you, in this example the Green Walls library author has declared a "Light" field and defined "Low," "Medium," "Bright," and "Full Sun" choices—and marked it as instance-editable.

To modify this field, right-click your shape and select "Edit Shape Data."

Screenshot of placed shape with context menu.
The shared fields tab in library settings.

SimpleDiagrams displays the shape data floating panel, which allows you to edit the properties (as allowed by the library) for this particular shape instance.

Screenshot of placed shape with data panel.
The shared fields tab in library settings.

Viewing and Exporting Shape Data

Excellent! Now we know how to view a shape instance's data.

It's kind of tedious though to click around on different shapes to see their data. So you can use the "Page Data" panel to view shape data for all shapes in the document.

Screenshot of page data panel.
The page data panel lists all shapes on the page, with inline fields for editing.

You can export your data to CSV or JSON for further processing in your much more serious software tools.

What do you think?

Ok so that's a brief intro into SimpleDiagrams shape data. So does this all sound useful? Send me a note and let me know if shape data really does help you in your daily work!

Back to the blog