Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: hwgxx on November 19, 2010, 07:11:33 pm

Title: i want to extends the icon of element "Componnet"
Post by: hwgxx on November 19, 2010, 07:11:33 pm
i would like to add a star on the icon of element "Component", at the same time, i will add a new stereotype and tagged values into EA. Whether can i get the emf file for original "Component" element ?
Title: Re: i want to extends the icon of element "Componn
Post by: KP on November 22, 2010, 08:23:39 am
There is no emf file. You can add decorations to elements though: search the help file for "shape scripts".
Title: Re: i want to extends the icon of element "Componn
Post by: hwgxx on November 22, 2010, 05:45:37 pm
i read the chapter about "Shape Scripts", i only can redraw the whole icon, but i want to draw on the basis of the current figure.

how should i do?

thx
Title: Re: i want to extends the icon of element "Componn
Post by: KP on December 01, 2010, 10:53:37 am
Your shape script will need to look something like this:
Code: [Select]
decoration star
{
    // insert drawing code here...
}
Title: Re: i want to extends the icon of element "Componn
Post by: Sunshine on December 03, 2010, 02:17:57 pm
To draw original shape use with a decorator on top you probably want to do something like this

Code: [Select]
decoration star
{
   // insert drawing code here...
}

shape main
{
    drawnativeshape();
}

Look at orientation in the help under shape attributes to position the decoration in NW, N, NE, E, S, SW ow W within in the containing element glyph.

If you want to see examples load the archimate mdg file located in the folder C:\Program Files\Sparx Systems\EA\MDGTechnologies into a model so you can see the shape scripts associated with the stereotypes.

Hope that helps.