EA-Matic is an add-in for Sparx Enterprise Architect that enables rapid EA add-in development. It uses the built-in scripting features of EA to relieve you of developing, building and deploying full-blown EA add-ins.

Aimed at corporate environments it greatly reduces the time to introduce new functionality.

With EA-Matic you can develop your EA add-in using nothing but EA, and deploy changes instantly to all model users.

The possibilities are endless. You can validate your own modelling rules, keep your model consistent by preventing the deletion of elements that are still used, add your own context menus, or make self-maintaining diagrams. The only limits are those of your imagination.

The table below shows how add-in development with EA-Matic differs from classic add-in development.

EA-MaticClassic add-in development
Required toolsOnly EAVisual Studio, Sharpdevelop, or equivalent IDE
Installation of a new versionInstantly available for all users without the need to install anything again on the workstations.Msi-deployment on all workstations
LanguagesVBScript, JScript, JavaScriptVB, C#
Security access on development machineNormal user rights are enough.Local Administrator rights required.

Version 2.3 has also introduced the Developer Mode

  • Automatically save all scripts (not only EA-Matic scripts) to a folder on your hard drive for version control.
  • Transfer scripts to another model
  • Embedded the EA Refdata Splitter tool to create support deploying scripts to other models
  • Embedded the TextHelper tool to switch between VBScript and SQL syntax for queries.



EA-Matic requires .Net framework 4.5 which is already installed on most Windows installations.


EA-Matic is part of the Bellekens EA Toolpack which includes other useful add-ins such as

When installing you can choose which of the tools you wish to install.



This one minute video will show how easy it is to create a new add-in for EA using EA-Matic

These steps below show you how to repeat the the steps from the introduction video on your own.

First make sure you have a script ready to use by EA-Matic.

EA-Matic new script

Add EA-Matic in the comments of the script and save it. Only scripts that contain EA-Matic will be considered by EA-Matic.


Open up the EA-Matic dialog with the menu option Extensions|EA-Matic|Settings.


On the left there’s a list of all add-in events you can subscribe to. Check each event you wish to add to the selected script.

Close the Settings dialog and press the refresh scripts button in EA

EA-Matic Refresh Scripts


Now open the the selected script and notice the newly created function(s)

function EA_OnContextItemDoubleClicked(GUID, ot)
'Add code here
end function

Add your functional code to the script and re-open the settings dialog to load your new code into EA-Matic. All changes to scripts are automatically loaded into EA-Matic every 5 minutes, but opening the settings dialog forces a reload of the scripts.

function EA_OnContextItemDoubleClicked(GUID, ot)
  MsgBox("Hello World")
end function

Now you can test the new code by double-clicking an element in your model.

Developer Mode

In order to enable Developer Mode, open the settings window and check the Developer Mode checkbox and fill in the Script Path.

The Developer Mode is registered per model. Typically you would enable this on your DEV model, but not on the TEST or PROD models.


Automatically save all scripts to disk

When Developer Mode is enabled, and the script path is filled in, EA-Matic will automatically save all model scripts to the specified folder.

EA does not have nested script groups, so in order to have some liberty in where the scripts are placed, you can use the path= comment.

This gives the developer a bit of freedom in how to structure the script repository.

EA Refdata splitter

With developer mode enabled the EA Refdata Splitter tool is now embedded as an add-in window.

This works exactly the same as the standalone version, but now conveniently inside EA.

Text Helper

The Text Helper is a little tool that can be used by VBScript developers.
It converts a regular SQL Query so it can be used in a script, and vice versa.

Start the Text Helper using the menu option Specialize | EA-Matic | Text Helper

Clicking on the SQL -> VBS button will add double quotes in front of each line, and  ” & vbNewLine & _ at the end, ready to be copy pasted in a script.

The button VBS -> SQL does the transformation the other way around, and removes the quotes so the query can be executed in your favorite query tool.

How it works

Enterprise architect uses operations with well defined names as “events” to trigger when something in EA happens. In order to subscribe to such an event an operation with this particular signature needs to be implemented in the add-in. The EA-Matic add-in catches all the events, and forwards them to the scripts if a function with the same signature exists.

EA-Matic how it works

EA-Matic also forwards the events to the local scripts that are loaded from the installation folder, and to any scripts defined in an MDG technology.

Frequently Asked Questions

Why is my new script not showing up in the EA-Matic script dropdown?

There can be two reasons:

  1. You forgot the EA-Matic keyword
    make sure that your script contains the keyword EA-Matic somewhere in the comments of a the script like this:

  2. There is an error in the script
    If the script interpreter cannot interpret your script then it will not show up in EA-Matic. Make sure that you have solved all issues, and that your scripts runs fine by calling them directly in the EA scripting environment.

Why is my script executed when I start EA or when I start EA-Matic?

You have top-level code in one of the EA-Matic scripts. When loading the EA-Matic marked scripts EA-Matic will need to interpret your scripts.
Interpreting script code means executing the top-level code. If you have code like the example below the messagebox with “Hello World” will show up every time the scripts are reloaded by EA-Matic because the call to execute main at the last line is top level code that will be executed.

sub main
MsgBox("Hello World")
end sub

Remove the last line calling main to avoid this problem.

1 reply

Comments are closed.