Topics
Prev Next

Automation

This topic provides answers to frequently-asked questions on working with Enterprise Architect's Automation service.

Question

Answer

See also

Does Enterprise Architect have an API?

Enterprise Architect has a comprehensive Automation Interface (API ) that you can use to write a script or write an Add-in.

Automation

Why is my Script Debugging not working for VBScript or JScript?

Debugging of JScript and VBScript requires an operating system component called the Microsoft Process Debug Manager. In the past, this has been traditionally installed by Microsoft Office, Microsoft Visual Studio or the standalone Microsoft Script Debugger. Sparx Systems is not able to distribute this component, due to licensing restrictions set by Microsoft preventing distribution of the product to third parties. Instead of distributing this product directly, Sparx Systems has provided instructions on how to download it from Microsoft.

Unfortunately, in 2016, Microsoft removed the download for the Microsoft Script Debugger from their website. This means that users who do not already have the script debugger can only download the installer (scd10en.exe) from untrusted third party web sites. This does not change the behavior for running JScript and VBScript scripts from Enterprise Architect. Only the ability to debug these two languages is affected.

As a result, Sparx Systems now recommends creating any new scripts in Javascript. Our Javascript implementation is based on the Mozilla Spidermonkey implementation, and is at least equivalent to using the Microsoft scripting languages. The advantage of using Javascript is that it is wholly built and distributed by Sparx Systems, meaning we are able to actively support both the execution and debugging of scripts into the future.

Automation

Where do I find the repository's Table names?

Enterprise Architect has an API (Automation Interface) that you can use to write a script or write an Add-in. This is preferred as the method of accessing the repository data, as opposed to using scripted SQL queries or updates.

However, if SQL statements are required, there is broad documentation of the Database in the 'Automation' Help pages, with reference to the table names associated with each of the Classes.  See the Automation Help topic.

Also see the general pages (... Package) for diagrams and (...Class) pages for functions and attributes under the Automation Reference Help topic.

The (...Class) pages contain the table names - see 'Associated table in .EAP file' at the head of each page.

For example, see the diagram under the Element Package Help topic and 'Associated table in .EAP file' details in the Element Class Help topic.

Reference Automation Element Class Element Package

How do I do a simple automation of a Report generation?

The Automation Interface supports generating Document reports using RunReport() in the Project Class of the Automation Interface.

Enterprise Architect Object Model Project Class

How do I automate the generation of HTML?

The Automation Interface supports generating HTML reports using RunHTMLReport () in the Project Class of the Automation Interface.

Project Class
-