<?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: EditOperation.ExecuteAsync runs, but edits aren't saved in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editoperation-executeasync-runs-but-edits-aren-t/m-p/1176065#M8164</link>
    <description>&lt;P&gt;I guess I didn't read far enough through the documentation on this. Using Inspector.ApplyAsync() was much slower than EditOperation.Modify(inspector). I then tested it just using the Modify(Row,String,Object) method and that was much faster than using the Inspector.&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2022 19:13:18 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2022-05-20T19:13:18Z</dc:date>
    <item>
      <title>EditOperation.ExecuteAsync runs, but edits aren't saved</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editoperation-executeasync-runs-but-edits-aren-t/m-p/1175745#M8158</link>
      <description>&lt;P&gt;I am running an EditOperation in my add-in, but after I call the ExecuteAsync method and look at the Edit tab, the Save button is activated. This is a problem, since the next step in the process is to run a dissolve on the edited layer. I get the error message that the dissolve cannot run since the layer is being edited.&lt;/P&gt;&lt;P&gt;In this code, I'm modifying two fields and saving the edits. Why aren't they being properly saved?&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        QueryFilter queryFilter = new QueryFilter { WhereClause = "1=1" };
        EditOperation editOperation = new EditOperation();
        Inspector inspector;
        editOperation.ShowProgressor = true;
        await QueuedTask.Run(() =&amp;gt;
        {
          using (RowCursor rowCursor = featureClass.Search(queryFilter, false))
          {
            while (rowCursor.MoveNext())
            {
              using (Row record = rowCursor.Current)
              {
                inspector = new Inspector();
                inspector.Load(record);
                inspector["PS_Count"] = 1;
                if (geometryType == GeometryType.Polygon)
                {
                  var feature = (Feature)record;
                  inspector["PS_Area"] = GeometryEngine.Instance.GeodesicArea(feature.GetShape());
                }
                editOperation.Modify(inspector);
              }
            }
          }
        });
        try
        {
          bool result = await editOperation.ExecuteAsync();
          if (!result) message = editOperation.ErrorMessage;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 21:00:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editoperation-executeasync-runs-but-edits-aren-t/m-p/1175745#M8158</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-05-19T21:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: EditOperation.ExecuteAsync runs, but edits aren't saved</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editoperation-executeasync-runs-but-edits-aren-t/m-p/1175754#M8159</link>
      <description>&lt;P&gt;Hi Ken,&lt;/P&gt;&lt;P&gt;Your code just makes the edit and adds it to the undo/redo stack.&lt;/P&gt;&lt;P&gt;If you want to save your edits, call&lt;/P&gt;&lt;PRE&gt; Project.Current.SaveEditsAsync()&lt;/PRE&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 21:34:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editoperation-executeasync-runs-but-edits-aren-t/m-p/1175754#M8159</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2022-05-19T21:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: EditOperation.ExecuteAsync runs, but edits aren't saved</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editoperation-executeasync-runs-but-edits-aren-t/m-p/1175832#M8160</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;The&amp;nbsp;&lt;/SPAN&gt;Inspector.ApplyAsync()&lt;SPAN&gt;&amp;nbsp;method applies and saves the changes in one shot (there is&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;no&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;undo). Whereas&amp;nbsp;&lt;/SPAN&gt;EditOperation.Modify(inspector)&lt;SPAN&gt;&amp;nbsp;will apply the changes and add an undo operation to the Pro undo/redo stack on&amp;nbsp;&lt;/SPAN&gt;EditOperation.Execute&lt;SPAN&gt;."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Editing" target="_self"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Editing&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 05:17:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editoperation-executeasync-runs-but-edits-aren-t/m-p/1175832#M8160</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-05-20T05:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: EditOperation.ExecuteAsync runs, but edits aren't saved</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editoperation-executeasync-runs-but-edits-aren-t/m-p/1176065#M8164</link>
      <description>&lt;P&gt;I guess I didn't read far enough through the documentation on this. Using Inspector.ApplyAsync() was much slower than EditOperation.Modify(inspector). I then tested it just using the Modify(Row,String,Object) method and that was much faster than using the Inspector.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 19:13:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editoperation-executeasync-runs-but-edits-aren-t/m-p/1176065#M8164</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-05-20T19:13:18Z</dc:date>
    </item>
  </channel>
</rss>

