Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: tmtm on January 28, 2008, 02:00:27 pm

Title: Custom Stereotype Icons without Shape Scripts
Post by: tmtm 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.
Title: Re: Custom Stereotype Icons without Shape Scripts
Post by: Thomas Mercer-Hursh 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.
Title: Re: Custom Stereotype Icons without Shape Scripts
Post by: KP 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...
Title: Re: Custom Stereotype Icons without Shape Scripts
Post by: «Midnight» 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?
Title: Re: Custom Stereotype Icons without Shape Scripts
Post by: Frank Horn 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?
Title: Re: Custom Stereotype Icons without Shape Scripts
Post by: «Midnight» 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.
Title: Re: Custom Stereotype Icons without Shape Scripts
Post by: Graham_Moir 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.



Title: Re: Custom Stereotype Icons without Shape Scripts
Post by: «Midnight» 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
Title: Re: Custom Stereotype Icons without Shape Scripts
Post by: Graham_Moir 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 !!