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;
}
}