Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extracting data from Enterprise Architect model

I'm trying to programmatically extract information from an Enterprise Architect model (saved in an XMI file) - I need it to generate some reports, but I don't want to go so far as to create an EA add-in. Is there a C# XMI parser library anywhere?

I could of course generate XMI parsing code from its XML schema, but that would be my second option.

like image 708
Igor Brejc Avatar asked Apr 22 '09 06:04

Igor Brejc


People also ask

How do I export an EA diagram?

Capture a diagram as an image fileIn the 'Save as type' field, click on the drop-down arrow and select the appropriate graphic format. Click on the Save button.

How do I export an enterprise architect project?

Open the project to copy from. In the Browser window, click on the Package to copy and use your preferred Export access method to open the 'Export Package to XML' dialog. Select the appropriate options and filename. Click on the Export button to begin the export process.


2 Answers

Do you really need an XML? EA saves its information in a database (Standard Jet DB alias MS Access format as of EA 7.5 despite its eap file extension), it should be easy to query. Another way is to use Automation interface (in C# you will need to import Interop.EA) to gain access to everything EA stores and also to diagrams that are generated.

like image 171
user160400 Avatar answered Sep 29 '22 21:09

user160400


Ok, what I've discovered so far is that there are different versions of XMI. To quote Wikipedia:

Several versions of XMI have been created: 1.0, 1.1, 1.2, 2.0 and 2.1. The 2.x versions are radically different from the 1.x series.

I exported EA model both to 1.1 and 2.1 and the exports really do look different, starting from top XML elements. So I guess when talking about a MI parser, you first have to specify which XMI version you are interested in.

like image 39
Igor Brejc Avatar answered Sep 29 '22 23:09

Igor Brejc