Author Topic: Figure out whether a diagram is shown  (Read 8185 times)

ErwinAhlers

  • Guest
Figure out whether a diagram is shown
« on: December 07, 2021, 05:41:31 pm »
Hello,

I iterate through the whole model via the automation interface and extract data from some packages. I also take the diagram via the clipboard. If the related diagram is not shown in EA Program, it will be shown before copying to the clipboard. So at the end of my iteration I have many diagrams open.
It would be great to figure out through the automation interface that the diagram, I would like to copy, is currently not shown/visible to the user. In that case I could close it again after copying.
Unfortunately I haven't found anything in the automation interface that might give me the possibility to do this.
So ist it not realizeable what I want to do?

Regards
Erwin

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Figure out whether a diagram is shown
« Reply #1 on: December 07, 2021, 06:22:01 pm »
No, there's unfortunately no way to figure out if a diagram is open or not.

I had the same problem a while ago; same annoying opening diagrams when trying to get the diagram image.

The solution I used was to export the package to XMI, including the diagram images.
For some reason EA doesn't need to open the diagrams in the GUI to be able to do that.

Diagram images are then saved to a package, using the diagram GUID as name.

Geert