Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Bencrush on August 09, 2010, 07:08:44 pm
-
Hi
i am using LayoutDiagramEx in my Addin to layout my diagrams. But this method opens a new tab for every diagram. My problem is, that there are serveral hundreds of diagrams to layout and EA always crashes, because of too many tabs.
Is there a way to directly close or even just not open a new a tab when layouting an diagram?
Thank you very much :)
-
Ben,
You could try to set Repository.EnableUIUpdates to false, and if that doesn't work close the diagram after layouting it by Repository.CloseDiagram (long DiagramID)
Geert
-
Hi Ben?
I had the same problem... Basically, you need to keep track of open and closed diagrams yourself.
If you are explicitly opening the diagrams with your Add-In, you need to close it yourself.
I think there was some discussion recently on how to detect if a diagram is already open (without resorting to using broadcast events).
HTH,
Paolo
-
Thank you for your fast replies :)
I tried Repository.CloseDiagram (long DiagramID) as Geert said and it worked perfect. I guess I was blind, not finding it in the User Guide.
Thank you very much :)
Ben