Book a Demo

Author Topic: Connector direction in MDG toolbox  (Read 6289 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Connector direction in MDG toolbox
« on: March 30, 2012, 12:10:32 am »
When defining a connector in a toolbox it is possible to choose the type. But how can I specify the direction? I want to define an undirected association but the connector is always created Source->Target since there is no way to set this default.

(I tried setting the notes to direction="undirected" and direction="Unspecified" but that does not work.)

Help!

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Connector direction in MDG toolbox
« Reply #1 on: March 30, 2012, 08:51:53 am »
It's half possible for stereotyped connectors - the «metaclass» element will have an attribute called "direction" that you can set as required. But unfortunately you won't be able to have a directed and undirected connector of the same kind in the same toolbox.
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Connector direction in MDG toolbox
« Reply #2 on: March 30, 2012, 10:02:03 pm »
Thanks, Neil. Not what I desired, but probably a way to achieve some work around.

q.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Connector direction in MDG toolbox
« Reply #3 on: March 31, 2012, 04:54:44 am »
Here's what I did:
- add a stereotyped connector to the MDG
- catch creation via OnPostNewConnector
- remove the stereotype
-- not by what EA suggests, but:
-- Execute (Update t_connector ..)
-- Execute (Delete From t_xref Where Client = connectorGUID)

Now that does it - almost. When opening the properties the connector type is still shown as what it was in the MDG (from a <<connect>> association I want to create an undirected <<>> connector). Only after reloading the whole project everything shows as it should. I can live with that...

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Connector direction in MDG toolbox
« Reply #4 on: April 01, 2012, 07:42:34 pm »
Quote
[size=18]...[/size]
I can live with that...

q.
No, You have to live with that...

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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Connector direction in MDG toolbox
« Reply #5 on: April 02, 2012, 07:33:43 pm »
Quote
No, You have to live with that...

Paolo

Ommm.

q.