Book a Demo

Author Topic: EA_OnDiagramClose  (Read 6275 times)

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
EA_OnDiagramClose
« on: March 16, 2010, 09:26:00 pm »
I have declared this operation in my C# addin as

Code: [Select]
public void EA_OnDiagramClose(EA.Repository Repository, int DiagramID)

Now I thought this would get called when a diagram gets closed, but it does not.

Does anyone know if there is a problem with this method?

Thanks

Graham
Using V12

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA_OnDiagramClose
« Reply #1 on: March 16, 2010, 09:31:08 pm »
What version are you working on?
In my version (7.5.850) that event doesn't exist. (or at least is not documented in the help file)

Geert

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: EA_OnDiagramClose
« Reply #2 on: March 16, 2010, 09:32:06 pm »
AH - I have V8 installed, forgot to put it back to 7!
Using V12

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: EA_OnDiagramClose
« Reply #3 on: March 16, 2010, 09:38:39 pm »
Just reinstalled v7.5.850 and found it in the help!
SDK For Enterprise Architect
    Enterprise Architect Addin Model
        Broadcast Events
            EA_OnDiagramClose
Using V12

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA_OnDiagramClose
« Reply #4 on: March 16, 2010, 11:06:57 pm »
Graham,

Just looked at the release notes, and these events were added in version 8.

It's always possible that there might be a bug there, but make sure you have a clean install before trying to use it.

Geert



jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: EA_OnDiagramClose
« Reply #5 on: March 17, 2010, 02:03:06 am »
Gave it a try using EA 8.0.852 -

EA_OnDiagramOpen and EA_OnDiagramClose both fail to work.

I tried a couple of the other new events and they seem to work fine.

Jim

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA_OnDiagramClose
« Reply #6 on: March 17, 2010, 02:51:23 am »
better report it as a bug then so they can fix it before the next release.

Geert

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: EA_OnDiagramClose
« Reply #7 on: March 17, 2010, 09:10:52 am »
They are called EA_DiagramOpen & EA_DiagramClose in the source code, but I believe they will be changing before EA 8 goes official, probably to EA_OnPostDiagramOpen & EA_OnPostDiagramClose, so please be aware that it's all subject to change.
« Last Edit: March 17, 2010, 01:03:04 pm by KP »
The Sparx Team
[email protected]

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: EA_OnDiagramClose
« Reply #8 on: April 01, 2010, 06:42:29 am »
Just an update. Just downloaded beta 3

The following functions work fine

public void EA_OnPostCloseDiagram(EA.Repository Repository, Int32 id)

and

public void EA_OnPostOpenDiagram(EA.Repository Repository, Int32 id)

(Above are for C#)

Jim
« Last Edit: April 04, 2010, 04:03:15 am by jkorman »