Author Topic: Adding connector with default appearance 'hidden'  (Read 4764 times)

Manfred Kröpfli

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Adding connector with default appearance 'hidden'
« on: September 02, 2009, 05:49:13 pm »
Hi

does anyone have a solution approach for following problem?

Using the EA API, I want to add a connector, which is just visible to the diagram in my current context. All other diagrams (this might be many), which as well contain the same endpoint elements, shall not show this newly added connector automatically (meaning the diagramlink is by default 'hidden' in all other affected diagrams).

How would you approach this?

Thanks for sharing your ideas with me
Manfred
« Last Edit: September 02, 2009, 05:50:03 pm by kroepfli »
Cheers
Manfred

Manfred Kröpfli

  • EA User
  • **
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: Adding connector with default appearance 'hidd
« Reply #1 on: September 10, 2009, 09:33:56 pm »
Hi all,

why does nobody dare to answer? Did nobody have this problem? Does nobody know an answer? Or is the EA API just no able to do this?

Still hoping for enlightening input
Manfred
Cheers
Manfred

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Adding connector with default appearance 'hidd
« Reply #2 on: September 11, 2009, 09:16:02 am »
I've never done this, but I think what you need to do is find every diagram on which both the start and end elements appear, create a diagram link for each diagram, and set all but one of the diagram links to hidden.
The Sparx Team
[email protected]

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Adding connector with default appearance 'hidd
« Reply #3 on: September 11, 2009, 08:40:18 pm »
Note that you will also have to detect [somehow!] in future when both elements the connector joins are added to a diagram. EA will attempt to draw the connector on the new diagram. This will occur even if the connector is not added to the underlying database for the project (either by you or EA). In every such case you must add the appropriate link to the diagram and mark it as hidden.

Yes, we've asked for a better way. No, we've not had one appear yet. It turns out to be a non-trivial problem. [Though IMHO, nor is it complex.]
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8599
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Adding connector with default appearance 'hidd
« Reply #4 on: September 11, 2009, 11:18:10 pm »
Quote
[size=18]...[/size]

Yes, we've asked for a better way. No, we've not had one appear yet. It turns out to be a non-trivial problem. [Though IMHO, nor is it complex.]
Yes, I agree.

It isn't trivial, but it isn't rocket science.  It requires additional metadata to be attached to the connector.

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

johnmc

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Adding connector with default appearance 'hidd
« Reply #5 on: September 14, 2009, 05:06:16 am »
Is it possible to just add a connector to a diagram without adding it to the model? Would this be suitable?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13303
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Adding connector with default appearance 'hidd
« Reply #6 on: September 14, 2009, 03:27:58 pm »
No, adding a connector to a diagram without adding it to the model is not possible. (luckily that is, I can imagine all kinds of issues when this would be possible)

Geert

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Adding connector with default appearance 'hidd
« Reply #7 on: September 15, 2009, 09:31:40 am »
Remember that 'things' (versus annotations) on a diagram, whether links or elements, are merely depictions of part of the model. If some 'thing' is not in the model it cannot be shown on a diagram. After all, there would be nothing to depict...
« Last Edit: September 15, 2009, 09:32:10 am by Midnight »
No, you can't have it!