User manual › Building a diagram — blocks, links, subsystems, saving
kind: manual#manual#canvas#blocks#links#subsystems#projects

Building a diagram#

A model is blocks on a canvas joined by links. This page covers putting them there, connecting them, organising them into levels, and saving the result.

Placing a block#

Find the block in the library navigator — it is arranged by family, and Block catalog — every library block is the same catalogue in page form — and drag it onto the canvas. Dropping it gives it a default size and a name taken from its type; both can be changed afterwards.

Double-clicking a block in the navigator does the same without the drag: the block is placed in the middle of the canvas you are working in. Double-click again without moving the view and the next one lands a step down and to the right, so it is not hidden under the first. Templates and your own blocks from the Block Wizard work the same way.

Every block carries its own description, visible when you hover it in the navigator and again in the information panel of its configuration dialog. That description is the authority on what the block computes, what its ports are and what its parameters mean.

Lining blocks up#

While you drag a block, guides catch it as it comes close to a tidy position, and a dashed line shows what caught it:

  • Centres — its centre comes level with another block's centre, across or down.
  • Equal gaps — its gap to the block next to it matches the gap between two neighbouring blocks in the same row or column.
  • The middle — it sits between two neighbours with the same gap to each.

A guide only ever pulls a block a short way from the pointer — the Catch Distance in Settings ▸ Canvas, 20 by default — so moving on frees it, and letting go leaves the block exactly where it was shown. Resizing a block catches the corners of the blocks around it in the same way. To move blocks with nothing catching them, turn Alignment Guides off on the same page.

Configuring a block#

Open a block's configuration dialog from the canvas. The parameters are the ones named in its description; the dialog shows the block's information panel beside them so you can read what a parameter does while setting it.

One parameter is on nearly every block: Sampling Time (s). In the blocks' own words, zero or less inherits the solver's rate; a positive value runs the block at that period. Left at the usual -1, then, the block runs at the rate of the level it sits on — the model's global sampling time at Home, or the subsystem's own rate where that subsystem sets one. It is inherited downwards from the enclosing level, not from whichever block happens to feed it.

Giving it a positive number pins that block to its own period, which is how a part of a model is deliberately run slower than the rest.

Wiring#

A link carries a signal from one output port to one input port. Drag from a source port to a destination port to create one. A click on a free port, with no drag, makes no link.

Two rules are worth knowing before you draw:

  • An input takes one link; an output can feed many. To send one signal to several places you do not draw several links from the output — you branch an existing one.
  • A link carries a type, and the port it lands on has to accept it. A drop onto a port that does not is refused rather than converted — see Signal types — what a port carries, and why a link is refused for what the colours and badges on the ports are telling you.
  • A branch starts on a link, not on a port. Dragging from a point on an existing link taps that signal and carries it somewhere else.

Levels and subsystems#

The top level of a model is called Home. A subsystem block holds a canvas of its own; opening it takes you a level down, and the subsystem navigation panel moves you back up. Blocks inside a subsystem are positioned relative to that level only — a subsystem is a real boundary, not a drawing convenience.

Group work into subsystems when a diagram stops fitting on one screen, and when you want to reuse it: a level you have built can be saved as a template of your own and inserted into another model.

What a diagram actually is#

The application can print any level back to you as a script that would rebuild it. This is the clearest description of what your drawing consists of, and it is worth reading once even if you never write one by hand. From the closed-loop example that ships with the application (trimmed to the lines discussed below — the full output also names, sizes and places every block and routes every link):

$ ICoreBlocks --console "generateRecipe"
Step = block(Control_Systems/Sources/Step);
Step.move(40, 295);
Step.setConfig(Step Time (sec), 1);
Step.setConfig(Final Value, 1);
Subtract = block(Control_Systems/Base_Blocks/Subtract);
Subtract_p = Subtract.addPort(in, ICoreDouble);
Subtract_p.setDescription("+");
Subtract_p_2 = Subtract.addPort(in, ICoreDouble);
Subtract_p_2.setDescription("-");
Gain = block(Control_Systems/Base_Blocks/Gain);
Gain.setConfig(Gain Value, 4);
…
l_2 = connect(Subtract<0>, Gain<0>);
l_3 = connect(Gain<0>, Transfer_Function<0>);
l_4 = connect(Transfer_Function<0>, Scope<0>);
l_5 = connect(l_4, Subtract<1>);

Three things in that output are the rules above, stated by the model itself:

  • connect(Gain<0>, Transfer_Function<0>) — a link names a port by number on each end, counting from zero.
  • connect(l_4, Subtract<1>) — the feedback path connects to a link, l_4, not to the Transfer Function's port. That is a branch.
  • Subtract.addPort(in, ICoreDouble) with descriptions "+" and "-" — a block's ports can be added and labelled, and on a Subtract the labels are what tell you which input is subtracted.

Copy, cut and paste#

Copy puts the selection on the system clipboard as text: the .icore recipe that rebuilds it — blocks with their settings, the links between them, notes, areas, images, and every subsystem with its contents. Because it is text, a copy can go anywhere text goes: paste it into another ICore Blocks window or project, into the command window, or into a text editor to read or change it. Cut does the same, then removes the selection as Delete does.

Paste looks at what is on the clipboard:

  • A picture — copied from a browser, a screenshot tool or an image editor — becomes an image on the canvas, at its own size up to 480 on its longer side.
  • A recipe becomes the objects it describes, placed with their top-left at the paste point. A block whose name the level already uses is renamed the way the editor names a second block of a type: Gain pastes as Gain 1, then Gain 2.
  • Any other text becomes a note holding that text.

A recipe is only built when it does nothing but make new objects and set them up. Text that would change or delete something already on the diagram is pasted as a note instead, so pasting never edits what is already there. Each paste is one step to undo.

Keyboard shortcuts#

Every shortcut is a row of the editor's menus, so the menu shows its key and the key does exactly what the row does. They act on the canvas you are looking at, and they stand aside while you are typing in a field or a block's name: there, Delete, Backspace and the arrows edit the text. On macOS, Ctrl is ⌘.

KeyWhat it does
Ctrl+Z / Ctrl+Shift+Z (or Ctrl+Y)Undo / redo, in the subsystem the canvas shows
Ctrl+X, Ctrl+C, Ctrl+VCut, copy, paste
Delete (or Backspace)Move the selection to the trash; in the Trash itself, delete it for good
Ctrl+ASelect everything on the canvas
F2Rename the selected block (one block, with its name showing)
Ctrl+R / Ctrl+Shift+RRotate the selected blocks a quarter turn clockwise / counterclockwise
Ctrl+GMove the selection into a new subsystem
Ctrl+Shift+XComment out the selection; if it is all commented out already, uncomment it
Ctrl+Shift+AAuto-arrange the blocks
Ctrl+FSearch everything (blocks, commands, settings) from the title bar
Ctrl+= (or Ctrl++), Ctrl+-, Ctrl+0Zoom in, zoom out, reset pan and zoom
Ctrl+S, Ctrl+O, Ctrl+PSave the project, open a project, print the diagram
Ctrl+Shift+NNew subsystem on the canvas you are looking at
Ctrl+ESolver configuration
Ctrl+D (or Ctrl+B)Build the project
Ctrl+T (or F5), Shift+F5Run, run in debug mode
F10, F6, Shift+F6Step, pause, stop
Ctrl+QQuit

Ctrl+D, Ctrl+T, Ctrl+E, Ctrl+R and Ctrl+Shift+X are where Simulink puts the same commands, so either habit works. There is no Ctrl+N for a new project: it is one of the keys a browser keeps for itself, and the editor runs in a browser too.

Saving and loading#

A model is a project — a folder, created when you save, holding the diagram and its settings. Opening a template copies it into a project of its own, so the shipped examples are never edited in place:

$ ICoreBlocks --console "openTemplate examples/Closed_Loop_Speed_Control"
opened 'Closed-Loop Speed Control' as a new project:
  …/Documents/ICore Blocks/Closed-Loop Speed Control

Projects live under Documents/ICore Blocks unless you save them elsewhere.

Once the diagram is drawn, Running a simulation — solver settings, sampling, starting and stopping covers making it run.

Real runs#

Every transcript on this page is a real run rather than an illustration. Binary ICoreBlocks.app, built 2026-09-25 23:58 (source at approximately commit 1dac24c5), re-run 2026-09-26; one process per line, HOME=<scratch> ICoreBlocks --console "<line>", with the startup lines removed and paths under that scratch home shortened to …. Re-run any line above to check this page against the program.