Book a Demo

Author Topic: Shape Script for a connector  (Read 3024 times)

Karan Mundhra

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Shape Script for a connector
« on: August 03, 2023, 02:07:00 pm »
I have dependency connector that is stereotyped.
The connector has a tagged value. This tagged value needs to be displayed along with the connector.
I tried a shape script as below, but it does not work. Any suggestions

shape label
{
   print("#TAG:EventType#"); //EventType is the tagged value. Its value needs to be displayed
}

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Shape Script for a connector
« Reply #1 on: August 03, 2023, 02:32:20 pm »
Connectors have multiple labels so you need a shape corresponding to which one of those you want to change.

See the list of available shapes for connectors here:
https://sparxsystems.com/enterprise_architect_user_guide/16.1/modeling_frameworks/reserved_names.html

Karan Mundhra

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Shape Script for a connector
« Reply #2 on: August 03, 2023, 06:28:02 pm »
Thanks!
The below works!

Code: [Select]
shape MiddleTopLabel{
  print("#TAG:EventType#");
}