Author Topic: Is there way to get notifications what linked document was changed  (Read 850 times)

degorochkin

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Hello,
I am trying to find out events that would notify about changes of the linked document. For some reason the OnNotifyContextItemModified event does not fired when i change (and save) element linked document.

Is there effective technique which allow me to be notified when linked document was changed?

PS
I already implement watchdog which look for elements linked doc changes on every significant user action (OnContextItemChanged, OnFileClose), but i need to keep growing hash map of elements (touched by user) with linked document MD5-hashes. This can lead to significant response time increase (during long user sessions).

Im using EA 11.1.1112 + C# .NET (Interop.EA.dll).

Thank u!


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7752
  • Karma: +165/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
I don't think there is an easy solution.

The only thing I can think of is to move the the costly function to a background thread, or to find some intelligent way to reduce the size of the hashmap.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 8972
  • Karma: +136/-124
  • I'm no guru at all
    • View Profile
I would also report this to Sparx. They may have an excuse for not firing the event, but who knows.

q.

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6200
  • Karma: +47/-5
    • View Profile
Personally, I think that this would be much more useful in a separate notification.
Simon

support@sparxsystems.com

Uffe

  • EA Practitioner
  • ***
  • Posts: 1073
  • Karma: +81/-5
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
I'm with Simon.

No ContextItemModified event is fired for a linked document, because the linked document is never in context.
The context refers to selection context, either in project browser or diagram, and the linked document is never visible in either.

But I agree an event for when a linked document has been saved would be useful. Perhaps also one for when it has been closed and, hey why not, when it's opened as well.

/Uffe
My theories are always correct, just apply them to the right reality.

degorochkin

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Thank you all!!

I will report this issue. I hope Sparx have a good solution or can give us an appropriate notifications.

« Last Edit: May 11, 2016, 08:35:49 pm by degorochkin »