Author Topic: Custom Stereotype Icons without Shape Scripts  (Read 3953 times)

tmtm

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Custom Stereotype Icons without Shape Scripts
« on: January 28, 2008, 02:00:27 pm »
How can you assign a custom graphic to a stereotype in a UML Profile project? I don't want to use the Shape scripts as I already have a robust set of icons.

I also want these icons to be serialized and distributed in or with the profile xmi file when I export the profile from my project.

Thank you.
« Last Edit: January 28, 2008, 02:02:54 pm by tmtm »

Thomas Mercer-Hursh

  • EA User
  • **
  • Posts: 386
  • Karma: +0/-0
  • Computing Integrity
    • View Profile
Re: Custom Stereotype Icons without Shape Scripts
« Reply #1 on: January 28, 2008, 02:28:20 pm »
Read up about Metafiles.  I haven't used them personally, but "Enables an image file to be used for the appearance of the stereotype." sure sounds like what you are asking for.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Custom Stereotype Icons without Shape Scripts
« Reply #2 on: January 28, 2008, 04:13:20 pm »
To distribute your images with your profile, you will need to bundle them all into an MDG Technology - more info in the help file...
The Sparx Team
[email protected]

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Custom Stereotype Icons without Shape Scripts
« Reply #3 on: January 28, 2008, 04:26:01 pm »
But I don't know if this helps you. AFAIK you cannot assign the image to your stereotyped class. At least not in the profile development stage.

Any clarification anyone?
No, you can't have it!

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Custom Stereotype Icons without Shape Scripts
« Reply #4 on: January 28, 2008, 11:42:20 pm »
Couldn't you include the icons in the MDG technology and then assign them to stereotypes via shape scripts using nothing but the "image" command?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Custom Stereotype Icons without Shape Scripts
« Reply #5 on: January 29, 2008, 04:20:30 am »
You just might have the solution Frank. I've not tried it, but that sounds quite plausible. You can give each image a name when you add it to the profile, so it should all connect.
No, you can't have it!

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Custom Stereotype Icons without Shape Scripts
« Reply #6 on: January 29, 2008, 08:39:54 am »
I believe you can add shapescripts to your stereotypes in a UML Profile, but you can't add images.   As stated above for images you have to bundle the UML profiles and images into an MDG technology - not that difficult with the MDG technology wizard.  The help is OK on this I think.




«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Custom Stereotype Icons without Shape Scripts
« Reply #7 on: January 29, 2008, 11:26:21 am »
Thanks Graham,

I misspoke myself there. I meant MDG Technologies. Perhaps in that case all the necessary conditions are there.

You'd still have to use a shape script to load the image, but at least you could try to do so by name.

David
No, you can't have it!

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Custom Stereotype Icons without Shape Scripts
« Reply #8 on: January 29, 2008, 11:29:00 am »
No problem,  but having just exported a UML profile all this has started me asking myself what the "alternate image" checkbox is for on the UML profile export dialogue box !!