During the working life of our customers who use Sparx Enterprise Architect they are experiencing a very often repeating situation. They copy their diagrams into a Word document. This document is afterwards used as documentation. If there is a change in any particular diagram they have to update the diagram in the document as well. They open the document, find the proper picture and replace it by copy and paste operation. Well, one diagram is nothing to get excited about. But what to do when there are dozens of diagrams? Use Active Diagram add-in for Word!
When you insert a diagram into your document by Active Diagrams, all those are updated by pressing just one button. One single button!
Are you already hooked? Go on reading.
There are four new buttons on the Add-in ribbon in the button group named EA Active Diagrams after the installation of Active Diagrams:
Your first step is the linking your document with the EA repository (EAP file or database link). Just press Link with EAP button and enter the repository location (connection string):
The repository location is stored with the document. You don’t have to make this step again if you don’t change the location of the repository.
Now, it is time to insert a diagram. Press Add New Diagram button, a dialogue with a repository structure appears:
Please note that the first showing of this dialogue consumes a little bit more time (seconds) because a new instance of EA for the opened document is creating in memory. This instance is ready for the next adding of the diagram until the document is closed. That means the diagram will be shown much quicker next time.
Select a diagram and press OK. A selected diagram will be inserted into the document.
Described dialogue has three tabs. Second one is for future version and the third one allows you to add a diagram GUID directly. You can find this GUID in Enterprise Architect in Project Browser. Select a context menu of the diagram a choose Copy | Paste à Copy Node GUID to Clipboard item. The GUID is copied into the clipboard.
The information about each diagram is stored in AlternativeText attribute of the image.
Since now, every time you press the Refresh button, all diagrams inserted by Active Diagram will be updated. It doesn’t matter if you have one diagram in the document or sixty five. This button will update all of them!
If you select a diagram inserted by Active Diagrams, you can see additional information about a diagram:
In case you don’t see this information pane, just check the check box Show Task Pane on Add-in ribbon. If you can’t see all values, just refresh the diagrams. Internal version will be changed from 1 to 2 or higher and all metadata will be shown.
If you want to use Active Diagrams you need to have installed this software on your computer:
- Microsoft Word 2013 or higher
- Sparx Enterprise Architect
Good news: Even if you use Active Diagrams the document can be edited by users without this add-in and without Enterprise Architect. They can see the diagrams, they only cannot update them.
Use Case Implementation
Linking with Enterprise Architect Repository
- A user opens a dialogue to insert the repository location (see the screenshot shown above).
- A user inserts a location.
- Active Diagrams add-in stores the location with the document in a user property called EAPFILE.
You can check the location in the document’s properties (standard Word dialogue).
Insert a Diagram
When a GUID of a diagram is inserted, Active Diagrams add-in asks Sparx EAP to save the diagram to the temporary file (.emf format) on a disk. After that the diagram is inserted into document as a linked image and is saved with the document. This allows reading a document to other users without the need of having Active Diagrams or Sparx EA on their computer.
When a Refresh button is pressed Active Diagrams goes through the whole document and all images inserted by this add-in.
How the Active Diagram add-in does know that a picture was inserted by him? It checks the picture’s AlternativeText property whether it contains a string according to a pattern shown below (GUID used there is just an example):
I have problems with the installation of the add-in. What’s wrong?
First of all, you have to have the right permission for installing software. If you can’t obtain it (for instance due to company policies), try to ask a service desk.
Some users cannot install a new version when the previous one is installed. In this case, remove the previous version in Control Panel.
I use Active Diagrams. Can another user without this add-in or Sparx EA edit a document with diagrams inserted by Active Diagrams?
Yes. Documents with diagrams inserted by Active Diagrams add-in can be edited by any user just with Word only. There is only one limitation – diagrams cannot be updated by this user.
You can use ActiveDiagrams for free (even for commercial purposes).
Download and installation
Download ActiveDiagrams.zip file, unzip it, run
setup.exe and follow the instructions.