Book a Demo

Author Topic: Displaying tags on connectors  (Read 6476 times)

terjea

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Displaying tags on connectors
« on: February 06, 2018, 06:44:56 am »
Hi, I am testing the BMM toolbox of EA and I would like to display tags on relations in the diagram such as "implements". Is there a setting for that?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Displaying tags on connectors
« Reply #1 on: February 06, 2018, 08:25:39 am »
You would usually use the stereotype for that. It's possible to write shape script for connectors to adorn them with more complex graphics or text.

q.

Nabil

  • EA User
  • **
  • Posts: 149
  • Karma: +5/-2
    • View Profile
    • View My LinkedIn Profile Here
Re: Displaying tags on connectors
« Reply #2 on: February 06, 2018, 03:55:56 pm »
yes it is possible using Shape Scripts as Qwerty mentioned.
But rather than displaying tag name on connector I would suggest to go with change colors of connectors based on tag value.
Displaying Values on connector makes the diagram messy.

Best Regards,
Nabil

Nabil

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Displaying tags on connectors
« Reply #3 on: February 06, 2018, 06:01:25 pm »
yes it is possible using Shape Scripts as Qwerty mentioned.
But rather than displaying tag name on connector I would suggest going with change colors of connectors based on tag value.
Displaying Values on connector makes the diagram messy.

Best Regards,
Nabil
We create widgets for displaying properties on arcs.  Some of them can be very small and so don't "get in the way".  We use Shapescripts for that.  Also, we have found that it is best to allow colours to be managed on an individual diagram basis - which is difficult if you base them on arc properties.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: Displaying tags on connectors
« Reply #4 on: February 06, 2018, 06:19:29 pm »
Connector line styles based on tagged values can be set using 'Diagram Legends' too, quite an interesting feature, to achieve visual cues, without shapescripts.

However you can use shapescripts as many others have suggested too.

A sample Shape script below,
Code: [Select]
shape main
{
    noshadow=true;
   
if(hastag("Ownership","Store"))
{
SetLineStyle("dashdot");
SetPen(0,0,255);
}
hidelabel("middlebottomlabel");
moveto(0,0);
lineto(100,0);
}
label middletoplabel
{
PrintWrapped("#TAG:Ownership#");
}

VKN

  • EA User
  • **
  • Posts: 187
  • Karma: +9/-1
    • View Profile
Re: Displaying tags on connectors
« Reply #5 on: February 07, 2018, 03:56:14 pm »
One other way is to display the tag values in a note element that is connected to the relation.

Create a Note element and create a link between the Note and the relation.
Then right click on the Note element and select Advanced | Link to connector Tagged Values