Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: SomersetGraham on July 10, 2015, 01:15:08 am

Title: Repository.GetCurrentDiagram
Post by: SomersetGraham on July 10, 2015, 01:15:08 am
Hi
My addin is using the GetCurrentDiagram method and checking the type of diagram.
However, if there is no current diagram (eg looking at Relationship matrix) EA reports that the addin has an exception as there is no diagram type

What is the best way to check that I have a valid diagram before calling GetCurrentDiagram?

Thanks
Title: Re: Repository.GetCurrentDiagram
Post by: qwerty on July 10, 2015, 04:31:10 am
IIRC GetCurrentDiagram returns nil if there is none open. So you would check that.

q.