1
General Board / Re: rotating shapes in port (shape script question
« on: September 03, 2012, 04:59:39 pm »
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.
Code: [Select]
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;
}
}