Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Colin Richardson on August 04, 2010, 12:19:43 pm
-
Must not have my caffeine levels at optimal...
:-/
-
I don't think there is a way to do this directly through the api. I created an Addin that used the EA_OnPostOpenDiagram and EA_OnPostCloseDiagram to keep a list of open diagrams updated.
Stan.
-
Thanks Stan - that worked a treat!
Or it did once I worked out that Repository.CloseDiagram doesn't invoke EA_OnPostCloseDiagram
:D
-
is this still true? There really is no API function to either 'list all open diagrams' or better still 'closeAllDiagrams' ?
-
If you want to close all the diagrams you could combine
Repository.GetCurrentDiagram()
and
Repository.CloseDiagram()
The only problem is when you have other non diagram tabs (search window, add-in window, database manager, etc...) open
Seems like you still need to keep the list of open diagrams yourself as there is not way to close the "current active tab"
Geert