Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Jon G. on April 25, 2009, 02:22:29 am
-
New to the forum...
We are attempting to export data models developed in EAP 7.0 into Erwin 7.2.9. We've had good results in moving entities, attributes and relationships across, using XMI 1.0 as an intermediate format.
However, we haven't had much luck in getting a readable diagram out of the imported model in Erwin. All entities arrive on top of each other, and we've so far had to manually position those entities to match the original EAP diagram.
Is there any way to modify our export routine so that a legible version of the diagram moves along with the data objects?
-
I don't think you can modify the xmi export directly, and I believe that even if that was possible it would be a big PITA.
What you could do is write a small program to fix the layout of the diagrams after they are imported in Erwin.
What you would need to in this program do is:
- Connect to EA
- Loop all diagrams of the exported package
- Get te coordinates of each object in the diagram
- Connect to Erwin
- Find the corresponding diagram object and set its coordinates.
This way you don't have to mess with the xmi export and your solution will keep working independant of the way the model is converted from EA to Erwin.
Geert
-
Thanks, Geert.
Totally agree about the PITA part.
Would your coding solution be dependent on the underlying database we use for EAP? Architecture currently limits me to MS-Access, though we're trying to get inline for SQL server.
-
No, the EA API can be used regardless of the database that is used.
-
That would do it, then.
Have you ever built such a program? What would a suitable language be? Are there any similar examples out here?
Thanks!
-
I've done something similar for a conversion from Rational Rose to EA using Visual Basic.
Nowadays I do my add-ins/add-ons in C# because that is the language used at my client.
I'm sure you can use Java as well, and I think you can use some other languages too, but I don't have experience with those.
I don't know about examples on the web, but I could send you a VBA example that queries a diagram and gets the objects on that diagram to create a scripted representation of the diagram.
-
Thanks, Geert—I’d be interested in seeing the sample.
-
If you send me an email I'll reply with the document containing the VBA
-
Can you please send me the VBA mentioned ?
(alvarodal-at-hotmail-dot-com)
Thanks in advance and best regards!