Book a Demo

Author Topic: EA_OnPostNewDiagramObject not called...  (Read 5535 times)

Lars J.

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
EA_OnPostNewDiagramObject not called...
« on: April 02, 2014, 12:39:38 am »
Dear,

I try to intercept the creation of a diagram object using EA_OnPostNewDiagramObject. The signature of the function is:

public bool EA_OnPostNewDiagramObject(EA.Repository r, EA.EventProperties eP)
{
    return true;  // just a test
}

But when I set a breakpoint in this method and create a new element of a stereotyped class (that I provided in a uml profile) then the breakpoint is not hit. It is only hit, when I create a standard class on the diagram.

Can I make EA call this hook anyway? Did I miss something?

thanks and regards.

Lars

Lars J.

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: EA_OnPostNewDiagramObject not called...
« Reply #1 on: April 02, 2014, 12:51:25 am »
Found a workaround:

EA_OnPostNewElement does the trick.



thx.

Lars

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: EA_OnPostNewDiagramObject not called...
« Reply #2 on: April 02, 2014, 01:02:32 am »
I have not tried it, but would say that on creating a new element on a diagram should trigger both hooks. First NewElement then NewDiagramObject.

q.

[edit] Just tried it (V11) and it works as described above.
« Last Edit: April 02, 2014, 01:26:09 am by qwerty »

Lars J.

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: EA_OnPostNewDiagramObject not called...
« Reply #3 on: April 03, 2014, 07:50:49 pm »
qwerty, thx for trying.

I also double checked. EA_OnPostNewElement is hit, EA_OnPostNewDiagramObject not.

I am using EA 10 ultimate. probably I am something missing.....


L.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: EA_OnPostNewDiagramObject not called...
« Reply #4 on: April 03, 2014, 10:36:08 pm »
I also tried with an BPMN element and no issue too. Same with V10. So you must be doing something wrong.

q.

P.S. Just found out that a Port only triggers NewElement. I'd rate this a bug. Any takers to submit a report? I'm sick of that.
« Last Edit: April 03, 2014, 10:40:55 pm by qwerty »