Book a Demo

Author Topic: Connect to element feature by Automation?  (Read 6721 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Connect to element feature by Automation?
« on: August 24, 2009, 04:25:50 pm »
This is nice functionality, but I couldn't see how to do it by automation.  Is it possible?

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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Connect to element feature by Automation?
« Reply #1 on: August 24, 2009, 04:46:40 pm »
I'm pretty sure you'll find that in the custom properties of the connector.
(In the database the connection to an element feature is stored in the t_xref with name "CustomProperty")

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Connect to element feature by Automation?
« Reply #2 on: August 24, 2009, 05:05:34 pm »
Just had a look and t_connector.StyleEx is getting the value:

Code: [Select]
LFSP={<guid>}R;LFEP={<guid>}L;
I'm guessing that LFSP is Linked Feature Start Property and LFEP is End Property. The R and L denote which edge of the object to attach to. The <guid> refers to t_attribute.ea_guid. The help for Connector.StyleEx in the Object Model says "Advanced style settings. Reserved for the use of Sparx Systems." so exercise caution, but you'll be pleased to hear it's read/write.
The Sparx Team
[email protected]

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Connect to element feature by Automation?
« Reply #3 on: August 24, 2009, 05:14:10 pm »
Indeed, the magic string on my little test in the StyleEx reads:
Code: [Select]
LFSP={1D7A2E6F-94BD-4862-8E07-2F35F889DFF3}L;
and the GUID is indeed the GUID of my attribute.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Connect to element feature by Automation?
« Reply #4 on: August 24, 2009, 05:28:01 pm »
Thanks guys (especially Sparxian Neil),

I'll give this a go in the next few days.  At present I'm involved in the Visio import problem mentioned in other posts.

It's good to see Sparx being more forthcoming about the internals of EA.

While I greatly appreciate Neil's input, I'm a little concerned that he's guessing.  While the guesses seem reasonable enough, it would be better if a Sparxian (at your leisure) could formally confirm his input.

Paolo
« Last Edit: August 24, 2009, 05:45:32 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Connect to element feature by Automation?
« Reply #5 on: August 25, 2009, 08:31:59 am »
Quote
While I greatly appreciate Neil's input, I'm a little concerned that he's guessing.
The only guesswork was what "LFSP" stood for  8-)
« Last Edit: August 25, 2009, 08:36:17 am by KP »
The Sparx Team
[email protected]