Book a Demo

Author Topic: Removing DiagramLinks  (Read 3495 times)

trickster60

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Removing DiagramLinks
« on: March 18, 2013, 12:30:00 pm »
Hi,

I have written an add-in (with version 9.3) in which I am trying to control the visibility of of certain connectors in certain diagrams.

Specifically I want to hide a specific type of connector in a specific type of diagram. I tried coding my add-in to delete the associated DiagramLink but found it impossible to actually delete it from the diagram's DiagramLinks collection (problem 1). So then I tried to simply set the IsHidden flag. This works BUT if I document the diagram in any way the connector shows up in the documented diagram (problem 2).

I am finding working with DiagramObjects and DiagramLinks rather difficult particularly in light of problem 1. In regard to problem 2 it seems the use of the IsHidden flag in EA is somewhat limited. Clearly the documantation functionality ignors it and similarly the opening of diagrams.

Is not being able to delete a DiagramLink through the API a bug or an artifact of how EA is implemented? I cannot see any logical reason why one shouldn't be able to (assumming I am not doing anything wrong in the way I am doing it).

Regards

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Removing DiagramLinks
« Reply #1 on: March 18, 2013, 12:56:30 pm »
Deleting a DiagramLink record will not hide the connector.  In EA, relationships will always appear by default if both the source and target objects are visible on the same diagram.  The only way to hide a relationship from a diagram is to set the IsHidden flag on the DiagramLink.

trickster60

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Removing DiagramLinks
« Reply #2 on: March 18, 2013, 03:43:21 pm »
ok thanks