Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: degorochkin on May 11, 2016, 01:09:32 am

Title: Is there way to get notifications what linked document was changed
Post by: degorochkin on May 11, 2016, 01:09:32 am
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!

Title: Re: Is there way to get notifications what linked document was changed
Post by: Geert Bellekens on May 11, 2016, 04:34:30 am
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
Title: Re: Is there way to get notifications what linked document was changed
Post by: qwerty on May 11, 2016, 08:34:33 am
I would also report this to Sparx. They may have an excuse for not firing the event, but who knows.

q.
Title: Re: Is there way to get notifications what linked document was changed
Post by: Eve on May 11, 2016, 10:32:34 am
Personally, I think that this would be much more useful in a separate notification.
Title: Re: Is there way to get notifications what linked document was changed
Post by: Uffe on May 11, 2016, 05:30:26 pm
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
Title: Re: Is there way to get notifications what linked document was changed
Post by: degorochkin on May 11, 2016, 08:33:54 pm
Thank you all!!

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