Barbara_Schneider

How to fire an edit event?

Discussion created by Barbara_Schneider on Apr 22, 2013
Hello,

I know how to listen to edit events, but I would like to fire an edit event myself. Does anyone know how to do this?
I tried the following (in C#):

UID editorUid = new UIDClass();
editorUid.Value = "esriEditor.Editor";
IEditor editor = _app.FindExtensionByCLSID(editorUid) as IEditor;

IEditEvents editEvents = editor as IEditEvents;
if (editEvents != null)
{
    editEvents.OnCurrentLayerChanged();
}


However, the QI from IEditor to IEditEvents doesn't work, editEvents is null.

Thanks,
Barbara

Outcomes