<?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: Save edits for a single feature class in an Edit Operation with edits in multiple feature classes in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/save-edits-for-a-single-feature-class-in-an-edit/m-p/1356977#M10795</link>
    <description>&lt;P&gt;Hi Wolf,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&amp;nbsp; I will give&amp;nbsp;&lt;SPAN&gt;Geodatabase.ApplyEdits a try.&amp;nbsp; Alternatively, is it possible to make changes to the undo/redo stack, i.e, remove the edits I don't want to save?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2023 17:52:41 GMT</pubDate>
    <dc:creator>KarenMeinstein</dc:creator>
    <dc:date>2023-12-05T17:52:41Z</dc:date>
    <item>
      <title>Save edits for a single feature class in an Edit Operation with edits in multiple feature classes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/save-edits-for-a-single-feature-class-in-an-edit/m-p/1352164#M10728</link>
      <description>&lt;P&gt;Let's say I have an edit operation going and there are edits in multiple features classes, but I only want to save the edits in one of the feature classes.&amp;nbsp; Is there a way to do this?&amp;nbsp; Project.Current.SaveEditsAsync() saves the edits to all of the feature classes, which I don't want to do.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 19:34:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/save-edits-for-a-single-feature-class-in-an-edit/m-p/1352164#M10728</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2023-11-21T19:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Save edits for a single feature class in an Edit Operation with edits in multiple feature classes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/save-edits-for-a-single-feature-class-in-an-edit/m-p/1352737#M10729</link>
      <description>&lt;P&gt;Hi KarenMeinstein,&lt;/P&gt;&lt;P&gt;If you are using Edit Operations on Pro SDK, you can use the Execute() method to save edits.&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;   var polyLayer = MapView.Active.Map.GetLayersAsFlattenedList().First((l) =&amp;gt; l.Name == "Polygons") 
      as FeatureLayer;
   var polygon = .... ;  //New polygon to use

   //Define some default attribute values
   Dictionary&amp;lt;string,object&amp;gt; attributes = new Dictionary&amp;lt;string, object&amp;gt;();

   attributes["SHAPE"] = polygon;//Geometry

   attributes["Name"] = string.Format("Poly {0}", ++count);
   attributes["Notes"] = string.Format("Notes {0}", count);

   //Create the new feature
   var op = new EditOperation();
   op.Name = string.Format("Create {0}", polys.Name);
   op.Create(polyLayer, attributes);
   if (!op.IsEmpty)
   {
     var result = await op.ExecuteAsync();
     if (!result) //Can also use if (!op.IsSucceeded)
      //TODO: get the op.ErrorMessage, inform the user
   }&lt;/LI-CODE&gt;&lt;P&gt;You can also use inspector class if you are editing attributes of selected features.&lt;/P&gt;&lt;P&gt;To get more familiar with how editing works in Pro SDK, you can read some text here:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Editing" target="_blank"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Editing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can also look at some code snippets of the editing functionality &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProSnippets-Editing" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2023 19:02:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/save-edits-for-a-single-feature-class-in-an-edit/m-p/1352737#M10729</guid>
      <dc:creator>VedantBajaj</dc:creator>
      <dc:date>2023-11-22T19:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Save edits for a single feature class in an Edit Operation with edits in multiple feature classes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/save-edits-for-a-single-feature-class-in-an-edit/m-p/1353648#M10741</link>
      <description>&lt;P&gt;If you use EditOperation your changes and additions end up in undo/redo stacks and the data is not saved until Project.SaveEditsAsync is called.&amp;nbsp; The ArcGIS Pro API doesn't support selective saving of changes in the undo/redo stacks.&amp;nbsp; You can't select the changes in one feature class and leave other changes on the redo/undo stack.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have edits to a particular featureclass you could try Geodatabase.ApplyEdits as documented here:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Geodatabase#editing-datastores" target="_blank"&gt;ProConcepts Geodatabase · Esri/arcgis-pro-sdk Wiki (github.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;ApplyEdits is only recommended for "Editing in stand-alone mode" but last time i tried it works on Add-ins as well.&amp;nbsp; I think this is the only option for your particular use case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2023 18:24:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/save-edits-for-a-single-feature-class-in-an-edit/m-p/1353648#M10741</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-11-27T18:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Save edits for a single feature class in an Edit Operation with edits in multiple feature classes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/save-edits-for-a-single-feature-class-in-an-edit/m-p/1356977#M10795</link>
      <description>&lt;P&gt;Hi Wolf,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&amp;nbsp; I will give&amp;nbsp;&lt;SPAN&gt;Geodatabase.ApplyEdits a try.&amp;nbsp; Alternatively, is it possible to make changes to the undo/redo stack, i.e, remove the edits I don't want to save?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 17:52:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/save-edits-for-a-single-feature-class-in-an-edit/m-p/1356977#M10795</guid>
      <dc:creator>KarenMeinstein</dc:creator>
      <dc:date>2023-12-05T17:52:41Z</dc:date>
    </item>
  </channel>
</rss>

