Sparx Systems Enterprise Architect (EA) will be more and more standard for model-based development. But what about data generated in the past?

MS Office applications like Word or Excel are often used to document engineering data. This is not always the optimal solution, but sometimes it was the quickest 😉

So why not connect MS Office and Enterprise Architect to transfer or synchronize data! Both tools have application interfaces. MS Office comes with a build in scripting language – Visual Basic for Applications (VBA). Enterprise Architect comes with a Windows COM API. This is also usable with VBA scripts.

Connect Office and EA in 6 steps…

1. Open your MS Office application (e.g. Excel)

2. Open the Visual Basic Editor by pressing Alt + F11

3. Open or create your VBA script for edit

4. Add a reference to the EA API:

VBA_Reference

5. Write your script. Below an example is shown to open EA in the background without showing the window and write some information to the debug window:

VBA_Editor

Here is the EA window showing the model:

ProjectBrowser

6. Now run your macro:

CallMakro

Have fun connecting EA with VBA!