<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to fire an edit event? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-fire-an-edit-event/m-p/419726#M11293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried the following (in C#):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;UID editorUid = new UIDClass();
editorUid.Value = "esriEditor.Editor";
IEditor editor = _app.FindExtensionByCLSID(editorUid) as IEditor;

IEditEvents editEvents = editor as IEditEvents;
if (editEvents != null)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; editEvents.OnCurrentLayerChanged();
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the QI from IEditor to IEditEvents doesn't work, editEvents is null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Barbara&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Apr 2013 09:40:29 GMT</pubDate>
    <dc:creator>BarbaraSchneider1</dc:creator>
    <dc:date>2013-04-22T09:40:29Z</dc:date>
    <item>
      <title>How to fire an edit event?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-fire-an-edit-event/m-p/419726#M11293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried the following (in C#):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;UID editorUid = new UIDClass();
editorUid.Value = "esriEditor.Editor";
IEditor editor = _app.FindExtensionByCLSID(editorUid) as IEditor;

IEditEvents editEvents = editor as IEditEvents;
if (editEvents != null)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; editEvents.OnCurrentLayerChanged();
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the QI from IEditor to IEditEvents doesn't work, editEvents is null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Barbara&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 09:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-fire-an-edit-event/m-p/419726#M11293</guid>
      <dc:creator>BarbaraSchneider1</dc:creator>
      <dc:date>2013-04-22T09:40:29Z</dc:date>
    </item>
  </channel>
</rss>

