Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: OpenIT Solutions on June 11, 2014, 07:11:11 pm

Title: Placing text with Shapescripts
Post by: OpenIT Solutions on June 11, 2014, 07:11:11 pm
Hi,

I'm struggling with a specific problem. I have a shapscript for a Gateway. I want to add a label under the gateway in the center. I've tried various combiniations of setorgin:

shape label
{
      setorigin("S",0,0);      
      if (HasTag("gatewayType","Inclusive")) {
            println ("ANY");
      }
      if (HasTag("gatewayType","Parallel")) {
            println ("AND");
      }
      if (HasTag("gatewayType","Exclusive")) {
            println ("OR");
      }                  
}

The lable always seems to pop up to left. Any idea what i'm doing wrong/missing ?

Regards,

Jon.
Title: Re: Placing text with Shapescripts
Post by: qwerty on June 11, 2014, 07:40:38 pm
Try compartments like here: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1401972705

q.
Title: Re: Placing text with Shapescripts
Post by: Eve on June 12, 2014, 09:20:03 am
I tried that recently, it seems that setorigin doesn't work for elements based on decisions.

Someone here was looking into it.
Title: Re: Placing text with Shapescripts
Post by: OpenIT Solutions on June 12, 2014, 06:24:19 pm
Hi,

Solved this one. FYI we use a Template package - so the placement of the 'label' on the Template diagram overrode whatever i had in the script  :(.

Regards,

Jon.