Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Guillaume on April 30, 2019, 08:13:50 pm
-
Hi,
I need to get the saved image for a diagram provided the option "Auto create Diagram Image" is enabled.
I created a simple script that runs the following query:
select t_document.StrContent from t_document inner join t_diagram on t_document.ElementID = t_diagram.ea_guid where t_document.DocName = 'DIAGRAMIMAGEMAP' and t_diagram.ea_guid = '"& myDiag.DiagramGUID&"'
I tried to decode the resulting content but it doesn't produce a valid image ou zip file. Any idea?
Thanks
-
Uh. Where do I find that option (and in which EA version)?
q.
-
It's available since EA13 I think. In EA14, open menu Configure > (Model) Options, then Cloud > Auto Create.
Once enabled, modify and save a diagram -> it will create an image in the DB
There's an option to run a batch update on all existing diagrams (it can take a while).
-
I don't have that Cloud option. Sorry then.
q.
-
In EA13.5, it's under Configure > Options > General
Then Data Cache at the bottom of the popup.
-
Found it. Will have a look...
q.
-
That's indeed no zip. And also it's no native BMP, PNG or JPG. I suspect it's some Sparxian alien blob.
q.
-
Hopefully the blob can be demystified by its creator ;)
-
I have no idea what they use it for. The best you can do is to create a image via API when you need it (though this needs opening the diagram tab ad dealing with potential diagram changes when it's already open).
q.
-
Actually the fastest way to export diagramImages is to export a package to xmi (with the option to include the diagram images)
A bonus is that EA doesn't open all those diagrams in the GUI.
Geert
-
with the option to include the diagram images
That's indeed tricky :-)
q.
-
Thanks for your answers
Howerver I'm looking for a more dynamic option that doesn't use an XMI file.
I'll continue investigating..
-
These diagram images can only be accessed through the PCS APIs (AFAIK), and this was primarily introduced for Webtools Prolaborate, WebEA etc (AFAIK)
-
Thanks for the clarification Nizam.