Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Uffe on December 07, 2011, 07:01:39 pm

Title: Shape script for Composite element
Post by: Uffe on December 07, 2011, 07:01:39 pm
Hi there!


I'm working on an MDG Technology for a client, where I need to create a shape script for an element type which is normally created as a composite.

If it isn't considered proprietary material, does anyone have a script snippet to draw the composite "link" symbol?

Cheers,


/Uffe
Title: Re: Shape script for Composite element
Post by: qwerty on December 07, 2011, 09:40:48 pm
One of the Sparxians posted it here. You have to search for it (good luck).

q.
Title: Re: Shape script for Composite element
Post by: KP on December 12, 2011, 09:19:06 am
Try something like this:

Code: [Select]
decoration composite
{
      orientation="SE";
      if(hasproperty("iscomposite","true"))
      {
            ellipse(0,40,40,60);
            ellipse(60,40,100,60);
            moveto(30,50);
            lineto(70,50);
      }
}
Title: Re: Shape script for Composite element
Post by: qwerty on December 12, 2011, 09:58:06 pm
That was the sort of automatic search I hoped for :-)

q.
Title: Re: Shape script for Composite element
Post by: Guillaume on January 20, 2022, 05:53:04 pm
Hi,

I had to do the similar update with a stereotyped use case and the above shapescript is not suitable so I ended up writing the following:

Code: [Select]
decoration composite
{
    orientation="SE";
    ellipse(-110,-30,-53,5); //left,top,right,bottom
    ellipse(-23,-30,39,5);
    moveto(-53,-15);
    lineto(-23,-15);
}