Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: AndyJ on February 16, 2010, 03:28:18 pm
-
Hi people,
I've created a simple shape script to display a person shape for classes stereotyped as a stakeholder...
As part of the script I've included the following code to display information about the stakeholder:
println("<<#stereotype#>>");
println("#NAME#");
println("#TAG:Stakeholder Type#");
Is it possible to control where this information is displayed in relation to the shape?
Is there another more appropriate method to display this information alongside the shape?
Currently I've put the shape on to the far right of the canvas to leave room for this text, but it makes associations look quite odd (lines terminating in blank space adjacent to the apparent shape.)
If anyone can point to a good reference about shape scripts I'd also appreciate it.
-
Hi Andy,
Unfortunately the printxx functionality doesn't respond to the setorigin command. I put in a bug report about it about two weeks ago. No response from Sparx yet.
The best you can do is to use a decoration subshape that allows you to move the shape around with the orientation attribute. You can move the text around a bit by using \n to add newlines to move it relative to the orientation point.
There's also the detached label mechanism but you can't set the location of the note relative to the shape automatically (as far as I know - maybe the Sparxians can correct me).
HTH,
Paolo