Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Coen on October 28, 2008, 01:41:20 am
-
In some diagrams we had quite a few notes which I've moved to the notes property of the elements concerned. This made the diagrams much easier to read and useable in presentations, etc... Now I would like to see on the diagram if there are notes added to an element, for instance by showing a pencil icon in the element like a stereotype. This pencil icon should only be shown when the notes are filled. When the notes are cleared, the pencil icon should disappear.
Is it possible to create a feature like this?
Kind regards,
Coen.
-
Shape scripts associated with stereotypes will do this.
Take a look in the online help and search for shape scripts.
Basically you would call the standard drawing method and then conditionally add a some icon.
Hope this helps.
Oliver
-
Or, only add a decoration script that shows the icon conditionally.
Of course, you can only do either of these if you have a stereotype on the element.
-
Simon,
Are decoration scripts the ones treated on the "Show stereotype icons" option?
Could you give me an example of one such example?
-
Could you give me an example of one such example?
decoration notes
{
orientation="NE";
if(hasproperty("notes",""))
{
// it would really help if shape scripts had 'NOT'...
}
else
{
setfillcolor(255,0,0);
ellipse(0,0,100,100);
// or you could draw the pencil that the O.P. mentioned
}
}