Book a Demo

Author Topic: Hide Connector in Diagram  (Read 4037 times)

Tom C

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Hide Connector in Diagram
« on: February 23, 2010, 09:20:44 am »
Hi. I am trying to hide connectors that I have created through the automation interface in appropriate diagrams. It seems that when the connectors are created within the model following the Add Connector example, they are not added to any diagrams at that point.

When I iterate through the DiagramLinks collection, the connectors that I created are not there. However, when I open the diagram, the connectros are there and visible.

I would like to automate hiding the Connectors I added, but cannot find a way to do this through the automation interface.

Thanks for any help.
Tom

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hide Connector in Diagram
« Reply #1 on: February 23, 2010, 06:29:13 pm »
Tom,

In EA there is a difference between Connector and DiagramLink.

Its a bit weird. If you create a connector between two elements it should normally show on every diagram that shows the two connected elements.
However, EA doesn't create a DiagramLink unless you change something to the layout of the link. Once you hide a link, or change its routing then the DiagramLink object gets created.

So if you want to hide a new connector on a diagram you will have to
- create the connector.
- create the diagramlink on the diagram
- set the diagramlink to hidden.

Geert

PS. I've seen some responses from Sparxians indicating that they might create DiagramLink for every connector shown on a diagram in one of the next versions (v8?) So it could be that in v8 there will always be a diagramlink for every connector shown on a diagram. I haven't tested it myself though.

Tom C

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: Hide Connector in Diagram
« Reply #2 on: February 24, 2010, 06:15:03 am »
Geert,

Thanks for your reply. That worked great. I appreciate your help.

Tom