Author Topic: Placing text with Shapescripts  (Read 3756 times)

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Placing text with Shapescripts
« 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.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Placing text with Shapescripts
« Reply #1 on: June 11, 2014, 07:40:38 pm »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8061
  • Karma: +118/-20
    • View Profile
Re: Placing text with Shapescripts
« Reply #2 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.

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Placing text with Shapescripts
« Reply #3 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.