Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: mkopf on November 29, 2005, 06:55:06 am
-
Hello,
does anyone know, how to modify the appearence of a stereotype, so that it has a small icon in the upper-right corner? Looking like, for example, as the stereotype "client page".
Thanks!!
-
A new feature of EA 6 is you can assign a shape script for the stereotype. Here's how...
From the main menu, Settings | UML | Stereotypes. Find and select the stereotype in the list, or create a new one. Select the "Shape Script" radio button and click "Assign". Enter your shape script, click "Refresh" to make sure it looks how you like, then click "OK", then "Save" and "Close".
So what should the shape script look like. Here's a very simple example to put a pale yellow rectangle in the top-right corner of an element:
Decoration Testing
{
Orientation="NE";
SetFillColor(255,255,200);
StartPath();
Rectangle(0,0,80,100);
EndPath();
FillAndStrokePath();
}
The orientation command positions the decoration according to compass position. Valid values are N, S, E, W, NE, NW, SE, SW and CENTER. The rectangle command works with percentage values. Decorations are a fixed size so this script draws a rectangle the full height but 80% of the width of a full-sized decoration. The startpath, endpath and fillandstrokepath commands when used together will fill whatever is drawn between the start and end with the defined fill colour (which is defined as a standard RGB value).
Shape scripts can have conditional logic based on most of the properties of the chosen element, and there's a large variety of drawing commands available. I don't think the help for shape scripts is finished yet, so we will give any assistance you need - just let me know what shape you want and I'll have a go...
:)
-
Thank you for the answer.
Unfortunately, I work with EA version 4.51.750 (Build: 750).
Best Regards.
M.Kopf
-
Hi,
I have the need of a stereotype icon representing a wall-mounted video camera, to add aesthetic to a deployment diagram for top management.
Is there any starting point?
Many thanks,
Massimo
-
I have the need of a stereotype icon representing a wall-mounted video camera, to add aesthetic to a deployment diagram for top management.
Is there any starting point?
The starting point is probably to decide whether you want a photographic image or a stylized drawing. Try a Google image search (http://images.google.com/images?q=cctv) for ideas.
-
sorry, I was not clear.
I need to create a stereotype image script, as in the "yellow box" example above in the topic.
I was asking wether there is an example of a shape script for a similar shape, to copy and use as a reference and a starting point.
Thanks,
Massimo