Archi vs Sparx EA: A Deep Dive into Scripting and Automation Differences

Introduction

Scripting is one of the most powerful capabilities in enterprise architecture tools. It allows architects to go beyond static diagrams and automate tasks such as model validation, metadata enrichment, reporting, and integration. Two popular tools in this space — Archi and Sparx Enterprise Architect (EA) — offer scripting, but their approaches, capabilities, and underlying technologies are quite different.

In this post, we compare scripting in Archi and Sparx EA, covering use cases, languages, APIs, performance, limitations, and real-world examples.

1. Supported Scripting Languages

Tool Languages Supported Environment
Archi JavaScript (via GraalVM), Groovy, Nashorn (deprecated) Archi Scripting Plugin / jArchi
Sparx EA VBScript, JavaScript, JScript, Python (with integration) Built-in Script Editor in EA GUI

2. Scripting Use Cases

Both tools allow scripting for tasks like:

  • Generating model reports (CSV, XML, Excel)
  • Finding orphaned elements or structural gaps
  • Bulk tagging or stereotype application
  • Automated diagram layout or creation
  • Exporting models for external processing

Archi Example Use Case

Using jArchi , a user can script the extraction of all ArchiMate elements with a specific tag and export them to CSV:


var nodes = model.find("element").filter(e => e.type == "ApplicationComponent");
nodes.forEach(function(n) {
    console.log(n.name + "," + n.get("owner"));
});

Sparx EA Example Use Case

Using the built-in scripting engine in EA:


sub ListRequirements()
    dim element as EA.Element
    for each element in Repository.GetElementsByType("Requirement")
        Session.Output(element.Name & " - " & element.Alias)
    next
end sub

3. API Access and Integration

Sparx EA exposes a rich automation API (COM-based) that can manipulate every aspect of the model: packages, diagrams, elements, connectors, tagged values, etc.

Archi, with jArchi, also exposes the full model via scripting — but is Java-based, and best suited for iterative manipulation of lightweight ArchiMate models.

4. Performance and Scalability

  • Sparx EA: Suitable for scripting in repositories with tens or hundreds of thousands of elements, especially when using .qea/.qeax or SQL-based backends
  • Archi: Performs well with medium-sized models (under 10k elements), but performance may degrade for large-scale operations depending on JVM tuning

5. Execution Environment

  • Sparx EA: Scripts are written and run inside EA’s GUI, with support for logging to a console, output window, or document. Scripts can be stored at project or group level.
  • Archi: jArchi scripts are often embedded within the model and run via the plugin. They can be saved as part of the repository or loaded externally. Batch mode execution is possible via CLI with GraalVM.

6. Community and Libraries

  • Archi: Strong scripting community on GitHub, especially for CSV import/export, validation, and doc generation.
  • Sparx EA: Scripting examples are less centralized but widely used in enterprise consulting. Prolaborate and Add-In development offer powerful extensions beyond scripting.

7. Limitations

  • Archi: Limited to ArchiMate metamodel. Not ideal for complex, cross-domain modeling or real-time integration.
  • Sparx EA: VBScript can feel outdated. Python support requires setup. Scripting is not always version-controlled.

Conclusion

If you're working in a lightweight ArchiMate environment, Archi scripting (especially with jArchi and GraalVM) is elegant, fast, and simple to use. For larger organizations modeling complex systems, integrations, or using multiple notations (BPMN, UML, SysML), Sparx EA offers far deeper scripting control and scalability — albeit with a steeper learning curve.

Keywords/Tags

  • Sparx EA scripting
  • Archi jArchi scripting
  • Archi vs Sparx automation
  • Scripting in enterprise architecture
  • EA scripting API examples
  • ArchiMate scripting plugin
  • Model automation in Sparx EA
  • Archi model export script
  • EA COM automation API
  • Bulk tagging and model transformation EA