Book a Demo

Author Topic: Repository.GetCurrentDiagram  (Read 4029 times)

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Repository.GetCurrentDiagram
« 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
Using V12

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Repository.GetCurrentDiagram
« Reply #1 on: July 10, 2015, 04:31:10 am »
IIRC GetCurrentDiagram returns nil if there is none open. So you would check that.

q.