Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Dave_Bullet on March 17, 2011, 08:42:41 am

Title: Generated MDG does not contain images
Post by: Dave_Bullet on March 17, 2011, 08:42:41 am
Do I need to separately import images the MDG refers to?  I would have thought not - since the MDG XML contains the images as encoded text?

I have shapescript which renders the images for my stereotypes in the profile of my MDG.  This profile is unique to the MDG (ie. I havent' previously imported it directly).

My problem is the elements do not show the appropriate PNG in the diagram (they just show their name at the bottom of the element as rendered by the shapescript).

When I go through the generate MDG XML wizard in EA, the images all show, I generate the MDG within the same EAP file containing my profiles and images.  EA writes out the images to be included as:
      <Images images="1,2,3,4,5,6"/>
in the MTS file.

since I can see the images encoded in the generated MDG XML file - I'm a bit confused as to why the images don't appear.

Any ideas?
Title: Re: Generated MDG does not contain images
Post by: Eve on March 17, 2011, 09:15:34 am
Prior to EA 9, the images in an MDG technology file were only available when the technology was imported into the model.
Title: Re: Generated MDG does not contain images
Post by: Dave_Bullet on March 17, 2011, 09:43:03 am
Thanks Simon.

I tried importing into the model - but the already deployed XML in the MDg folder was confusing it.  So I deleted it from the MDG folder, restarted EA and opened the project (with the MDG checked since it was imported into the project) and the images now appear.
Title: Re: Generated MDG does not contain images
Post by: jakob on April 14, 2011, 01:49:39 am
So it's not possible to import images via an add-in without user interaction in EA 8?
Title: Re: Generated MDG does not contain images
Post by: KP on April 15, 2011, 08:59:57 am
Quote
So it's not possible to import images via an add-in without user interaction in EA 8?
Your add-in can import reference data using the undocumented (and likely to remain so) command:

Repository.CustomCommand("Repository","ImportRefData",sXML)

where sXML is a string containing the reference data.
Title: Re: Generated MDG does not contain images
Post by: wikitect on April 22, 2011, 06:23:58 am
Quote
Your add-in can import reference data

Does this apply to any reference data e.g. tagged values? Is it then just a substitute for a manual import which can then be changed by the user (and is therefore not as consistent as using inviolate data from the MDG itself)?