ICore Blocks / Features / My Blocks

Your blocks.
Your library.
Nobody's dependency.

The blocks you keep rebuilding should be blocks. The Block Wizard turns a subsystem or a Python script into a library block in four steps. It lands under My Blocks in every project on your machine and behaves like the built-in blocks. And a model built with it still opens on a machine that has never seen your library.

Composite · a captured subsystem Scripted · Python compute() One .iblock file Typed ports
My Blocks → Block Wizard → My_Blocks/Sensors/Level_Flag stamp, not a type
The wizard · 4 steps
  1. 1Kind & sourcePython script
  2. 2IdentitySensors / Level_Flag
  3. 3Behaviorin 0 f64 · out 0 flag bool
  4. 4Finishmonogram LF · Create Block
Level_Flag.iblock · abridged
---ICORE-BLOCK v1---uuid = 5b1c…name = Level_Flagfamily = Sensorskind = pythoninputs = 1outputs = 1outputLabels = flagoutputTypes = ICoreBoolsummary = 1 while the level is above 0.5---ICORE-BLOCK ICON---<svg …> LF </svg>---ICORE-BLOCK DESCRIPTION---<h3>Level_Flag</h3> …---ICORE-BLOCK BODY---def compute(t, u, state):    # u is the list of input values;    # return one value per output port.    return [u[0] > 0.5]
Level_Flag.iblock - deleted
Library · canvas MY BLOCKS › SENSORS LF Level_Flag out 0 bool HOME LF LF f64 bool Level_Flag K f64 Gain ✕ bool → f64 refused
✓ project saved, reopened, runs unchanged
its blocks are ordinary blocks
Kinds2
Files per block1
Block types registered0

The whole lifecycle of one block. Four steps write one file. The file puts a tile in the library. Dropping the tile places an ordinary Python Code block carrying the script, with a bool output that a Gain refuses while the wire is still being dragged. Then the file is deleted, and the project still opens and runs, because nothing in it ever pointed at the file.

My Blocks → Block Wizard
The Block Wizard asking what kind of block to build, with a live preview The Block Wizard asking what kind of block to build, with a live preview
The real wizard, on its first step. The kind decides what the remaining three ask: identity, then ports and body, then icon and description. The tile in the corner is the block as the library will draw it.
01 · Two kinds of block

Package a diagram, or write a script.

A block is either something you have already built and tested on a canvas, or a few lines of Python. The wizard's first step asks which.

Composite

A subsystem, captured

Pick a subsystem from the open project, or start empty and fill it later. The capture is a copy, so the original stays yours to keep editing.

Ports
The subsystem's gate blocks, named after the gates
Types
Read from the gates and stated, not chosen
Body
Recipe text, the same language as the project file
Drops as
A subsystem. Double-click it to look inside.
Scripted

A Python compute()

Set the port counts, fill in the port table, write the script, and press Validate Script, so a syntax error shows up while you are writing, not at the first simulation.

Ports
One table row per port: label and signal type
Script
def compute(t, u, state): returns one value per output
Rate
Once per sample of its Sampling Time, under every solver
Drops as
A Python Code block carrying the script
02 · Four steps

From idea to library tile.

01 · Kind & source

What it is made of

A Python script, a captured subsystem, or an empty subsystem to fill later.

02 · Identity

Name it

The name and family become My_Blocks/<Family>/<Name>. The one-line summary is what the library shows.

03 · Behavior

Ports and body

The port table and the script, or a summary of what the capture takes and which of its gates become ports.

04 · Finish

Icon and description

A generated monogram or your own SVG, and a description, written as HTML, for the hover card and the configuration dialog.

Press Create Block and the tile appears under My Blocks immediately, with no restart. The library rebuilds itself live as it changes, and search finds your block beside the built-in ones.

03 · Typed ports

A port says what it carries.

Every port starts as an ordinary double, so a block of plain numbers needs nothing here. When a port should carry something else, the picker lists every signal type the application knows, and nothing else:

f64ICoreDoubleboolICoreBool i32ICoreInt32strICoreString…
  • On the canvasThe port draws in its type's colour and carries its badge.
  • On the wireA wire only connects to a port that accepts its type. A bool output won't drop onto a Gain, and it is refused while you drag, not at run time.
  • In the fileThe type is recorded in the .iblock, restored on reload and declared by code export.
  • In PythonA scalar Boolean or Integer input arrives in compute() as a native bool or int, and a String as a str.
  • CompositeNo picker. The gates already decide the types, so the wizard just states them.
04 · Stamping

A stamp, not a new block type.

Nothing registers itself into the block factory. When you place a block of your own, it is built from ordinary blocks: a subsystem filled from the recipe body, or a Python Code block carrying the source. Placing it is one undo step.

That matters because a project that used your library is made entirely of standard blocks. It opens, runs and exports on a machine that has never seen your .iblock file. Your library makes authoring easier; it never becomes a dependency of the models you build with it.

This is tested, not just intended. A regression case places each kind of block, deletes its .iblock, saves, reloads and runs again, and it requires the second run to match the first.

  • In the projectSubsystem contents, or a Python Code block with its script and typed ports. Everything a run needs.
  • In the libraryThe tile, the icon and the description under My Blocks. Only authoring needs these.
  • Engine & exportUnchanged. No new type exists, so simulation, code export and export verification see only blocks they already know.
05 · Where they live

One file per block. One folder per family.

Blocks live in Documents/<App>/Blocks/<Family>/<Name>.iblock. The folder tree is the family tree, with no catalogue file to drift out of date, and every project on the machine sees the same library. Sharing a block with a colleague means sending them one file.

  • Edit…Reopens the wizard on the block. Renaming it moves its file.
  • Export…Writes the .iblock wherever you point.
  • Import Block…Takes a colleague's file. If a different block has the same name, it asks before replacing it.
  • DeleteRemoves the block from the library. Blocks already placed keep working.
  • Show in FolderOpens the block's family folder.

A file the app can't read is listed on the My Blocks page with the reason. It is never modified, never half-loaded and never silently dropped.

Honest edges

  • Copies, not linksEditing a block later doesn't update the copies already placed in projects, the same as a Simulink library block with its link disabled.
  • No parameter maskA composite's inner settings are edited inside it, not through a single facade dialog.
  • Canvas faceA composite is drawn on the canvas as a subsystem, not with its own icon.
  • Python timingA scripted block is discrete. It runs once per sample, and the solver can't see inside the script, so a switch at a known moment needs a sampling time that lands on that moment.
  • SimulinkYour blocks cross the Simulink bridge as what they are underneath, subsystem contents or a Python block, which has no Simulink counterpart.

In the documentation: user block and .iblock in the glossary  ·  signal types and their badges.

See also: AI agents that edit the diagram  ·  Your code in the loop

Get started

See it run on your own model.

Download the application from the customer portal, or read the documentation first - the manual, a page for every block, and the full command reference are public.