Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: swe on August 31, 2012, 10:18:17 pm
-
Does anyone know how to make EA Architect rotate an arrow for example to point in the right direction? Here is my scenario: I am creating an AUTOSAR port which has an arrow decorating the port (points outward for output, inwards for input). However, When I move my port around the class, the orientation of the arrow remains fixed at 0 degrees. Is there a way to have the arrow rotate as needed depending on where the user places the port?
-
See the shape script used for ports in SysML. It's a bit complex but feasible.
q.
-
I don't have access to the SysML ports it seems. However, I figured out a simple solution in case anyone is intersted. I have 4 cases based on where the port is located (the edge). Here is the code, and accompanying picture.
shape main{
setpencolor(0,0,0);
rectangle(0,100,100,0);
setfillcolor(0,0,0);
if(hasProperty("parentedge", "right"))
{
polygon(50,50,3,35,0);
return;
}
else if(hasProperty("parentedge", "left"))
{
polygon(50,50,3,35,180);
return;
}
else if(hasProperty("parentedge", "bottom"))
{
polygon(50,50,3,35,270);
return;
}
else if(hasProperty("parentedge", "top"))
{
polygon(50,50,3,35,90);
return;
}
}
-
That's what is used in the SysML solution in principle. Congrats and thanks for posting. I did not do the latter as I thought Sparx' coding might be somehow copyrighted (although the script did not contain a copyright itself).
N.B. You can either remove the "else" or the "return" statements.
q.
-
I did not do the latter as I thought Sparx' coding might be somehow copyrighted (although the script did not contain a copyright itself).
Wise... I'm no lawyer, but it seems that even extracting it is on shaky ground according to the license agreement.
YOU hereby undertake not to sell, rent, lease, translate, adapt, vary, modify, decompile, disassemble, reverse engineer, create derivative works of, modify, sub-license, loan or distribute the SOFTWARE PRODUCT other than as expressly authorized by this EULA.
(Emphasis mine)
-
Thanks for the pointer. To me the process did not seem to be a "real" reverse engineering as it's so easy to do (at least for me). But I'll keep that emphasis in mind.
q.
-
Try submitting a feature request (please) for this basic piece of funtionality.
See also rotate feature request (http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1307921175/0#0)
-
Uh, what feature request? They can do what they were asking.
-
Yes, sorry, they did say shape script, I was thinking about being able to rotate an arrow (or similar shape) in a diagram from the UI.