Author Topic: refresh edit Linked Document window (tab) after LoadLinkedDocument  (Read 1955 times)

jumbie

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Hi all,
I want to solve this problem:

1. With Artifact Document I have Linked Document opened for editing in the Tab window.

2. I start the script, at first I save the Linked Document to a temporary external docx file using SaveLinkedDocument

3. I perform some operations on this file using VBA by script

4. I return this file to the Linked Document using LoadLinkedDocument.

Everything works OK, just one "little" thing:

In the open editing window, this document will not be refreshed after loading from file
and there is the original content before processing.

I need either:

a) refresh the editing Tab window for Linked Document using a script - at the end of script after LoadLinkedDocument

b) or the script will close this Tab editing window so that the user has to reopen this window and this will refresh the contents of the window.

(I can delete the Linked Document by script, but it is dangerous operation) 

Any recommendations?

Thanks!


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11299
  • Karma: +421/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
There are a few things to try

  • Repository.AdviseElementChange (long ObjectID) should work in theory. It's worth a try
  • Select something else in the project browser, and then your element again. That should make EA reload the linked document window.

Geert

jumbie

  • EA User
  • **
  • Posts: 39
  • Karma: +0/-0
    • View Profile
Hi Geert,

with AdviseElementChange the user is notified that the document was changed by another user, and it is enough. 

Thanks !!!

(But I have another serious problem, it will be placed in another thread)

Jumbie