Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Guillaume on January 27, 2017, 12:40:57 am

Title: EA13 image assets
Post by: Guillaume on January 27, 2017, 12:40:57 am
Hi,

I looked at the image assets introduced in EA13.
It's very useful since I have a number of projects where we had to organize images, which is a pain with the Image Manager.

- When converting an image to an image asset, is this asset linked with all image instances on the various diagrams? It didn't seem to be fully the case when I did a number of tests (especially checking with the Find in all diagrams..)
- Can we have a feature to convert all current images, or a selection to image assets so the convert doesn't have to be done individually? If not, can it be achieve via the API / scripts?
- Can I safely add tagged values to image assets e.g. to apply a category value?
- Will the image library on http://www.sparxsystems.com.au/resources/image_library.html  be released as images assets for EA13?

Thanks
Guillaume
Title: Re: EA13 image assets
Post by: stevesavage on February 06, 2017, 12:26:59 pm
Hi Guillaume, I've also been experimenting with image assets, this is what I've found so far:


What I'd like is a way to set the image asset as the "default" appearance for the element, but that doesn't seem to be possible yet.

So I'm trying to see if I can make a script work around for step 2.   
At the moment this is what I've figured out:

When you want to use the image asset for an element in the diagram:

So it seems to be that a script could be created that would work by:

Will experiment and post once I figure things out.
What I don't know right now is how Sparx EA generates the value DUID=608EC5C1;
Title: Re: EA13 image assets
Post by: Paolo F Cantoni on February 06, 2017, 05:41:29 pm
Hi Steve,

I think the DUID is related to the GUID of the element.  Possibly the "right hand" portion thereof?

I think a Sparxian mentioned that one time

HTH,
Paolo
Title: Re: EA13 image assets
Post by: stevesavage on February 07, 2017, 12:38:16 am
Thanks Paolo, I thought that might be the case, but at the moment I haven't found a GUID that it matches up with.

The image asset is stored in t_document,

In t_object,

There is also an XREF entry for the image asset:
In t_xref, the XrefID = {A21E578D-6DCE-41a7-8986-B42E417636DB}, client = {5E923B0A-B2C7-4761-9739-480DA752DCAE} (the client is the GUID of the asset Element)

The GUID of the diagram = {DE664BE3-F69F-4259-A0B2-7F8FFDCEB351}

So I'm not sure where 608EC5C1 was pulled from.

I put the same Class Element on a different diagram and set it appearance to the same image asset and go a DUID of FFEED9EF
Title: Re: EA13 image assets
Post by: Eve on February 07, 2017, 08:26:41 am
It's a Diagram Unique ID, and is just an 8 digit1 hex number.

Any correspondence to part of any GUID is either pure coincidence, bad programming or bad random number generator.

1 Technically a hexit.
Title: Re: EA13 image assets
Post by: Paolo F Cantoni on February 07, 2017, 10:47:57 am
It's a Diagram Unique ID, and is just an 8 digit1 hex number.

Any correspondence to part of any GUID is either pure coincidence, bad programming or bad random number generator.

1 Technically a hexit.
Thanks for correcting that, Simon.
So, if I understand you correctly, the DUID just needs to be unique for a given diagram.

Paolo
Title: Re: EA13 image assets
Post by: qwerty on February 07, 2017, 08:37:34 pm
I found one use of the DUID in StyleEx (see chap. 9.11 and 9.12 Inside or search for DUID therein).

q.
Title: Re: EA13 image assets
Post by: Eve on February 08, 2017, 08:49:24 am
So, if I understand you correctly, the DUID just needs to be unique for a given diagram.
That's the idea.