Book a Demo

Author Topic: i want to extends the icon of element "Componnet"  (Read 5256 times)

hwgxx

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
i want to extends the icon of element "Componnet"
« 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 ?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: i want to extends the icon of element "Componn
« Reply #1 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".
The Sparx Team
[email protected]

hwgxx

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: i want to extends the icon of element "Componn
« Reply #2 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

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: i want to extends the icon of element "Componn
« Reply #3 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...
}
The Sparx Team
[email protected]

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: i want to extends the icon of element "Componn
« Reply #4 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.
Happy to help
:)