Help & Documentation

Learn how to use StructureGram

How Auto-Layout Works

StructureGram arranges your diagrams for you. You add entities and relationships, and the diagram positions everything — no dragging required. That is auto-layout, and it is on by default.

The one thing worth understanding is when auto-layout stops arranging things. There is no auto/manual switch to set. The mode follows what you have done to the diagram: it is on auto until you edit the geometry by hand, and manual from then on.

Auto-layout runs until you move something

A diagram stays on auto-layout until you edit its geometry by hand. The moment you do, that diagram switches to manual and keeps your arrangement instead of rearranging over it.

That is deliberate. If auto-layout kept running after you had positioned things yourself, it would throw your work away every time the diagram refreshed.

How to tell which mode you are in

Look at the main Layout button in the diagram toolbar. It is a status indicator, not a switch — it reports whether the canvas is clean or has hand edits, and changes label and colour on its own:

ButtonMeaning
Auto-layout (green)Auto-layout is running. Nothing has been hand-edited.
Manual-layout (amber)You have hand edits. The diagram keeps your arrangement.
Auto-layout blocked (amber)Annotations are preventing auto-layout — see below.
Flex-layout (purple)The diagram is using Flex link routing.

The colour is the message: green means nothing has been hand-edited, amber means something has.

What switches a diagram to manual

These are hand edits, and any one of them switches the diagram to manual:

  • Moving an entity — dragging a node to a new position
  • Editing a link route — dragging a relationship line to change its path
  • Resizing an entity, or moving a relationship label
  • Changing what is on the canvas — adding a new entity, or hiding or removing one, so the saved arrangement no longer matches what is displayed

Panning and zooming do not count. Moving around the canvas or zooming in and out is not a hand edit, and will not take a diagram off auto-layout. Your viewport position is remembered separately.

Getting back to auto-layout

Two clicks:

  1. Click the amber Manual-layout button in the toolbar to open the layout panel.
  2. Click the amber Layout button inside it.

Auto-layout is re-applied, your hand edits are discarded, and both buttons return to green.

The amber colour is your warning. An amber button will discard something when clicked. A green one is a no-op — nothing has been hand-edited, so clicking changes nothing. That is why these buttons do not ask you to confirm: the consequence is visible before you click.

Choosing what to reset

The layout panel gives you three buttons rather than one, so you can discard just the edits you want to undo. Each is green or amber independently.

ButtonWhat it rebuildsWhat it discards
LayoutEntity positions and link routesEntities you have moved and routes you have edited
LinksLink routes only, around entities where they areHand-edited link routes. Entity positions are kept
Labels & sizesRelationship labels and entity sizes back to defaultsLabels you have moved and entities you have resized. Positions and routes are kept

So if you have carefully positioned your entities but the connecting lines have become tangled, use Links — it tidies the routing and leaves your placement alone.

When auto-layout is blocked

If the button reads Auto-layout blocked, annotations are the usual cause. Annotations sit at fixed positions on the canvas, so auto-layout cannot rearrange around them without moving them out from under your notes.

Remove or reposition the annotations to let auto-layout run again. See Diagram Annotations.

Keeping a layout you like

There is no separate lock. Arranging a diagram by hand is how you keep it — once you have moved something, the diagram is on manual and will hold that arrangement. Just leave the Layout button amber.

The thing to avoid is clicking an amber button expecting it to save your work. Amber discards; it does not preserve.

Related Topics