Book a Demo

Author Topic: MDG Shape Script and Image - What am I missing?  (Read 4953 times)

JamesM

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
MDG Shape Script and Image - What am I missing?
« on: December 20, 2022, 10:41:58 pm »
Created an MDG with numerous stereotypes. Endeavouring to implement specific image for a specific stereotype.  Image files are all .emf.  All preloaded in to development project and included as images within the MDG.

shape main
{
    layouttype="border";
    image("TechName::PC",0,0,100,100);
   addsubshape("name","S");
      shape name
      {
         h_align="center";
         print("#NAME#");
      }
}

When MDG is imported into new empty project the specific stereotype is rendered as a grey box with the name underneath.  The expected image is not presented on element.  From review of the Images library, all the image files are present by name but when you view the image the image is simply a grey box.  Can anyone explain and guide me as to what I may be doing wrong. Any advice would be greatly appreciated.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: MDG Shape Script and Image - What am I missing?
« Reply #1 on: December 21, 2022, 12:27:27 am »
Did you include the images in the MDG?

Geert

JamesM

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: MDG Shape Script and Image - What am I missing?
« Reply #2 on: December 21, 2022, 12:33:34 am »
Yep all .emf images in the MDG

YogaMatt

  • EA User
  • **
  • Posts: 111
  • Karma: +8/-0
    • View Profile
Re: MDG Shape Script and Image - What am I missing?
« Reply #3 on: April 26, 2023, 04:23:33 am »
Hello JamesM
Did you succeed in your endeavours with this?
Did the solution depend upon them being in the image manager, or could it link to Image Assets?
Thanks in advance,
Matt

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: MDG Shape Script and Image - What am I missing?
« Reply #4 on: April 26, 2023, 07:29:23 am »
James,
the name of the image must NOT be prefixed with your technology. It looks like you do so.

q.

MissMamis

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: MDG Shape Script and Image - What am I missing?
« Reply #5 on: April 29, 2023, 07:10:09 am »
It seems that the image files are not being loaded correctly when the MDG is imported into a new empty project. The image is simply a grey box instead of the expected image.

It is possible that the image files are not being loaded correctly because they are in .emf format. You can try converting them to .png format and see if that resolves the issue.
If you are still having issues, you can try posting your question on a forum or community board where other developers may be able to help you troubleshoot the issue.