I have an addin which is responding to the EA_OnPreNewDiagramObject event.
What I'm trying to do is to intercept this event, and, in some conditions, not create the diagram element which the user has chosen, but add some other diagram objects instead. (all very logical, in context of the addin..honest).
The basic event handling works well: returning 'true' lets EA create the element in the diagram, and 'false' stops it.
So far, so good.
What EA is quite unhappy about is adding the alternate diagram elements to the diagram, in the middle of handling this event, which I guess I should expect, as it might really confuse EA...
Has anyone tried to do this?
I suppose I'd like to somehow remember what alternative objects I'd like to create, finish dealing with the EA event, then do my own thing afterwards.
But how to get control back into my addin to create the alternative objects?