Book a Demo

Author Topic: Externalize labels in shape script  (Read 4067 times)

tsriramnarayanan

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Externalize labels in shape script
« on: December 29, 2011, 04:33:34 pm »
Hi,

I need to externalize some lables in shape script .

Is it possible to do this with tagged values.

Thanks in advance


KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Externalize labels in shape script
« Reply #1 on: December 30, 2011, 08:43:54 am »
Try something like this:

Code: [Select]
shape main
{
      drawnativeshape();
}

shape label
{
      setorigin("SW",0,0);
      print("#tag:mytag#");
}
(replace "mytag" with the name of your tagged value)
« Last Edit: December 30, 2011, 08:44:42 am by KP »
The Sparx Team
[email protected]

tsriramnarayanan

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Externalize labels in shape script
« Reply #2 on: December 30, 2011, 05:42:32 pm »
Thanks for your reply.

I have two questions

I need to have four labels for my streotyped element .

1) How can I have declare four labels in shape script using taged values?


I need to have two activity elements .One inside another.

2) Is it possible to  use drawnativeshape  twice ?

Thanks in advance


KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Externalize labels in shape script
« Reply #3 on: January 03, 2012, 08:55:04 am »
Quote
I need to have four labels for my streotyped element .

1) How can I have declare four labels in shape script using taged values?
You can only have one label per diagram object. I guess you will need to make your label display 4 times the information.

Quote
I need to have two activity elements .One inside another.

2) Is it possible to  use drawnativeshape  twice ?
Each activity element (and each shape script) will only be responsible for drawing itself. You can't have one element's shape script draw another element.
The Sparx Team
[email protected]

tsriramnarayanan

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Externalize labels in shape script
« Reply #4 on: January 05, 2012, 05:21:36 pm »
Thanks for your reply.

Is it possible to do this with UML profiles?

Thanks in advance