Book a Demo

Author Topic: Reloading opened diagram when deleting connector from it  (Read 3086 times)

Tartofraize

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Reloading opened diagram when deleting connector from it
« on: October 29, 2018, 09:52:09 pm »
Hello,

I'm working on a C# addin for Enterprise Architect 12 and i'm facing a problem.
I need to perform automatic connector deletion when user deletes specific connectors on the diagram.

To achieve this I'm using the EA_OnPreDeleteConnector() EA callback. I'm able to delete the
connectors I need to remove but when I try to refresh the diagram with Repository.ReloadDiagram()
EA crashes. It doesn't seem possible to refresh the current diagram in a preDelete callback. If I
don't call reload everything is fine but connectors automatically removed (from code) are still there.
I must close and reopen the diagram in EA GUI to see them disappear.

After removing connector from code, how can I reload the diagram and avoid this EA crash ?

I need a sort of OnPostDeleteConnector EA callback to reload the diagram or maybe I'm doing the
deletion in a wrong way (I'm deleting connectors by removing them from the collection Element.Connectors).

Thanks in advance.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Reloading opened diagram when deleting connector from it
« Reply #1 on: October 29, 2018, 11:50:45 pm »
I guess you can't. I seem to remember having had similar issues and there has been a recent similar posting here.

Send a bug report. Don't hold your breath.

q.