Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

How to fire an edit event?

$
0
0
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#):

Code:

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

Viewing all articles
Browse latest Browse all 1374

Trending Articles