Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: nrocha on October 16, 2007, 01:32:12 am
-
Hi,
I've been analysing the structure of an EA database and I think that the diagram images (i.e. what you can export to *.jpg or *.gif) are not stored.
What is stored is the data of the objects and connectors (like dimensions) that is latter used, I think, by EA to display the images.
I would like to have access to the diagram images to insert in the documentation being produced. With all this, I think my only chance would be automation to generate the images and then put them inside the docs.
Can anyone confirm this? Is there some way to get the images without using EA automation (with direct access to SQL database)?
Regards.
-
True. The image is not stored. It is produced on demand. You can store the image on disk using Diagram/Save as...
-
Without resorting to automation your only option, as Thomas pointed out, is to resort to Diagram-Save As.. and store images somewhere on the file share.
You can, alternatively and if you have time to spare, resort to automation and see if you can save images in DBMS and use it later for your documentation purpose. I personally think that this effort is much hustle and Save As or even Copy to clipboard, although manual, would serve your purpose.
Regards,
D
-
That was too obvious ;D I was writing an add-in for recursive storage of all diagrams when posting that. The add-in took less than 30 minutes to write it.
-
Hmm,
the idea of an add-in that stores the images in the database when you save the project sounds interesting...is this what you were talking about?
You see, this is supposed to be part of a web app for generating custom reports and I would really like if I didn't need using automation on the part of document generation/update...if all of the data was in the database it would be much cleaner and the images are the only thing that aren't.
Regards
-
Just an idea here (which may be way off base), but...
I wonder if you could get at this another way.
EA allows you to include diagram images in XMI exports. I have no idea if you can 'decode' the images easily - to date I've not had any reason to parse them - but if you could...
Perhaps you could create a set of XMI exports, then store them in some convenient location: a separate DBMS, extended tables in EA, structured tagged values of memo type, etc.
If you wanted to refresh the images periodically or in response to various events you could write an add-in to handle that. However, the add-in would not (have to) run at the time you actually used (i.e. distributed) the reports.
David