Book a Demo

Author Topic: Changing Style of a DiagramLink  (Read 3742 times)

Happy

  • EA User
  • **
  • Posts: 55
  • Karma: +0/-0
    • View Profile
Changing Style of a DiagramLink
« on: December 02, 2010, 02:49:27 am »
Hi,

I tried to create a little Script which changes the Style of all DiagramLink object within the current diagram.

However I end up with the Style Attribute of the DiagramLinks, which are Strings and contain values like:

Code: [Select]
Mode=3;EOID=15B50742;SOID=913CC538;Color=-1;LWidth=0;
or

Code: [Select]
Mode=3;EOID=FA28C764;SOID=38ECF3CC;Color=-1;LWidth=0;TREE=LH;      

This looks like I would need to parse this string?

Help of EA also suggests changing the style at the connector itself, but all connectors used by DiagramLinks im my diagram don't have any of the suggested Tagged Values (_TreeStyle, _lineStyle or TREE). And I think all I want is to change the style of the connector in this specific diagram.

Like it was suggested by Geert in a similar thread here last year ...
( http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1250003691/29#29 )

Any Ideas?

Thx
Happy

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Changing Style of a DiagramLink
« Reply #1 on: December 02, 2010, 09:32:33 pm »
Yep, you'll need to parse the string, and find out which key/value pairs you need to use by trial and error, since they are not documented (and may be subject to change in a subsequent release) :'(

Geert

McMannus

  • EA User
  • **
  • Posts: 108
  • Karma: +4/-1
    • View Profile
Re: Changing Style of a DiagramLink
« Reply #2 on: July 22, 2014, 07:35:38 am »
Hi all,

just as an addition to Geert's post: In order to change the lineStyle of a connector, one can as well temporarily add the ConnectorTag "_lineStyle" and set it to whatever value. Subsequently, one deletes it again. In this manner, the previously set line style stays active and the user is still able to change the line style.