Select to view content in your preferred language

How to fire an edit event?

443
0
04-22-2013 02:40 AM
BarbaraSchneider1
Deactivated User
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
0 Kudos
0 Replies