Author Topic: Generated MDG does not contain images  (Read 4087 times)

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Generated MDG does not contain images
« 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?
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Generated MDG does not contain images
« Reply #1 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.

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: Generated MDG does not contain images
« Reply #2 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.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

jakob

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Re: Generated MDG does not contain images
« Reply #3 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?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Generated MDG does not contain images
« Reply #4 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.
The Sparx Team
[email protected]

wikitect

  • EA User
  • **
  • Posts: 117
  • Karma: +2/-0
    • View Profile
    • TRAK Community
Re: Generated MDG does not contain images
« Reply #5 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)?
======
Favourite epitaph: 'Under this sod lies another'

TRAK Framework https://sf.net/p/trak
MDG for TRAK https://sf.net/p/mdgfortrak