<?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 Re: Can I select a new feature in a feature class before saving the change? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-i-select-a-new-feature-in-a-feature-class/m-p/390086#M10370</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Some other observations relevant to the issue in my previous post:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I�??m not observing this �??blindness�?� to previous edits with other tools I�??ve developed, even when the edits involve creating new features.&amp;nbsp; For example, successive edits with my tool based on the Split Command are aware of the incrementing value of a field representing a unique ID, but maybe that is because each new feature and its new attribute values is stored using the IFeature.store() method before another new feature is added?&amp;nbsp; Maybe there is something different with the OBJECTID field?&amp;nbsp; Or with how the Split Tool stores its features?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Puzzled as usual,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kerry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Mar 2014 21:22:04 GMT</pubDate>
    <dc:creator>KerryAlley</dc:creator>
    <dc:date>2014-03-18T21:22:04Z</dc:date>
    <item>
      <title>Can I select a new feature in a feature class before saving the change?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-i-select-a-new-feature-in-a-feature-class/m-p/390085#M10369</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 have a VB.NET addin button that activates the ArcMap "split command" for the user and then updates the attributes of the resulting arcs.&amp;nbsp; I would like to make another button that is almost identical, but using the "split tool" instead of the "split command".&amp;nbsp; However, the new arc is not selected after the split tool executes, so I am unable to update its attributes.&amp;nbsp; I would like to add the new arc to the selection set, possibly by referring to its OBJECTID.&amp;nbsp; I know that the OBJECTID of the new arc is the largest one in the edited (unsaved) version of the feature class, but if I reference the feature class via its layer in ArcMap, I will only see the pre-edited version (without the new feature).&amp;nbsp; Any suggestions how I can get around this issue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kerry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 19:15:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-i-select-a-new-feature-in-a-feature-class/m-p/390085#M10369</guid>
      <dc:creator>KerryAlley</dc:creator>
      <dc:date>2014-03-18T19:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can I select a new feature in a feature class before saving the change?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-i-select-a-new-feature-in-a-feature-class/m-p/390086#M10370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Some other observations relevant to the issue in my previous post:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I�??m not observing this �??blindness�?� to previous edits with other tools I�??ve developed, even when the edits involve creating new features.&amp;nbsp; For example, successive edits with my tool based on the Split Command are aware of the incrementing value of a field representing a unique ID, but maybe that is because each new feature and its new attribute values is stored using the IFeature.store() method before another new feature is added?&amp;nbsp; Maybe there is something different with the OBJECTID field?&amp;nbsp; Or with how the Split Tool stores its features?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Puzzled as usual,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kerry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2014 21:22:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-i-select-a-new-feature-in-a-feature-class/m-p/390086#M10370</guid>
      <dc:creator>KerryAlley</dc:creator>
      <dc:date>2014-03-18T21:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can I select a new feature in a feature class before saving the change?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/can-i-select-a-new-feature-in-a-feature-class/m-p/390087#M10371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have a VB.NET addin button that activates the ArcMap "split command" for the user and then updates the attributes of the resulting arcs.&amp;nbsp; I would like to make another button that is almost identical, but using the "split tool" instead of the "split command".&amp;nbsp; However, the new arc is not selected after the split tool executes, so I am unable to update its attributes.&amp;nbsp; I would like to add the new arc to the selection set, possibly by referring to its OBJECTID.&amp;nbsp; I know that the OBJECTID of the new arc is the largest one in the edited (unsaved) version of the feature class, but if I reference the feature class via its layer in ArcMap, I will only see the pre-edited version (without the new feature).&amp;nbsp; Any suggestions how I can get around this issue?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;Kerry&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can get the new feature by listening on Editor events&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UID editorUid = new UID();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; editorUid.Value = "esriEditor.Editor";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IEditor3 m_editor = ArcMap.Application.FindExtensionByCLSID(editorUid) as IEditor3;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_editEvents = m_editor as IEditEvents_Event;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //To get the original feature
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // m_editEvents.OnChangeFeature += new IEditEvents_OnChangeFeatureEventHandler(m_editEvents_OnChangeFeature);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Get the new feature
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_editEvents.OnCreateFeature += new IEditEvents_OnCreateFeatureEventHandler(m_editEvents_OnCreateFeature); &lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;In OnCreateFeature&amp;nbsp; event handler you can add your new arc to the selection &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; void m_editEvents_OnCreateFeature(IObject obj)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureSelection pFeatSel = arcFeatureLayer as IFeatureSelection;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeatSel.Add(obj as IFeature);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ArcMap.Document.ActivatedView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null); 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:53:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/can-i-select-a-new-feature-in-a-feature-class/m-p/390087#M10371</guid>
      <dc:creator>AhmedEl-Sisi</dc:creator>
      <dc:date>2021-12-11T17:53:14Z</dc:date>
    </item>
  </channel>
</rss>

