Book a Demo

Author Topic: How to create diagram links via automation?  (Read 5314 times)

chrvi

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
  • There are so many hidden features...
    • View Profile
How to create diagram links via automation?
« on: July 18, 2007, 11:15:04 pm »
Hi,

could anyone please explain me the structure of DiagramLink path and geometry attributes?
I'm trying to import a model containing diagrams into EA but I don't understand the structure of EA Diagram Link attributes.

Here are "geometry" and "path" values of a very simple diagram link created manually in EA printed out:
geometry attribute value:
Code: [Select]
SX=49;SY=-87;EX=0;EY=0;EDGE=3;$LLB=CX=17:CY=14:OX=0:OY=0:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;LLT=CX=100:CY=14:OX=0:OY=0:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;LMT=CX=81:CY=27:OX=0:OY=0:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;LMB=CX=26:CY=14:OX=2:OY=9:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;LRT=CX=61:CY=14:OX=0:OY=0:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;LRB=CX=7:CY=14:OX=0:OY=0:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;
IRHS=;ILHS=;, style: Mode=3;EOID=F6C7F085;SOID=ED15F429;Color=-1;LWidth=0;,

path attribute value:
Code: [Select]
599:-392;

I guess
Code: [Select]
LLT=CX=100:CY=14:OX=0:OY=0:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;
means something like LabelLeftTop position is [100,14], OX,OY=???, Hidden=false, Bold=false, Italic=false, Underlined=false, CLR=???, Align=0 (probably 0=center), DIR=???, ROT=???

IRHS,ILHS=??? (R and L will probably be Right and Left but I have no idea what the rest means)

style:
Code: [Select]
Mode=3;EOID=F6C7F085;SOID=ED15F429; ???

path 599:-392 could mean a path with just one added point with coordinates [599,-392] (i.e. not a straight line between the two diagram objects)

I'll keep trying myself but isn't there any kind of documentation or specification or anything like that?

I wonder if it's possible for a human being to find out the meaning of all those parameters and to use them to create own nice diagrams via automation in a desired way...

Thanks.
« Last Edit: July 19, 2007, 11:56:23 pm by chrvi »
Radek

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How to create diagram links via automation?
« Reply #1 on: July 29, 2007, 04:32:22 pm »
Quote
could anyone please explain me the structure of DiagramLink path and geometry attributes?

Not fully, but I can have a guess at bits...

Quote
I guess
Code: [Select]
LLT=CX=100:CY=14:OX=0:OY=0:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;means something like LabelLeftTop position is [100,14], OX,OY=???, Hidden=false, Bold=false, Italic=false, Underlined=false, CLR=???, Align=0 (probably 0=center), DIR=???, ROT=???

Mostly correct. I think CX,CY are the label size and OX,OY are the offset from default position, although I may be wrong. CLR=-1 means default colour, any other value is an RGB colour value. DIR is direction indicator. ROT is rotation.

Quote
style:
Code: [Select]
Mode=3;EOID=F6C7F085;SOID=ED15F429; ???

Mode is the line style (i.e. Direct, Auto-Routing, Custom etc). 3 is Custom.

Quote
I'll keep trying myself but isn't there any kind of documentation or specification or anything like that?

No. Maybe there should be - I'll ask around, see if we can add the answers to the next issue of the SDK.
The Sparx Team
[email protected]

Jeff Odell

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: How to create diagram links via automation?
« Reply #2 on: July 31, 2007, 02:34:27 pm »
My entry here:

http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=Automation;action=display;num=1185185815

provides a couple additional hints from an email I once got from support.

HTH - jlo

chrvi

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
  • There are so many hidden features...
    • View Profile
Re: How to create diagram links via automation?
« Reply #3 on: August 02, 2007, 03:01:49 am »
Thanks guys for your advices.

I finally decided not to "copy" the link geometry from Rational Rose (which was the reason I wanted to find out how a link geometry works in EA).

Instead, I found out that I do not have to create Diagram Links at all! :-)

Once you have elements connected by connectors and once you create Diagram Objects having ElementID equal to the ID of the desired element EA creates all the DiagramLinks (based on the connectors between elements) automatically. Hoorray! :-)
Radek