<?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: Redraw Triggers Discard EditOperation in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/redraw-triggers-discard-editoperation/m-p/813679#M2446</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After taking another crack at this issue,&amp;nbsp;I figured out a work around for us to use for the short-term until a patch can be provided (preferred, of course).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that in the EditCompleted event handler, if I check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Project.Current.HasEdits &amp;amp;&amp;amp;&amp;nbsp;Project.Current.EditedDataStores.Length == 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that this is only occurring when you use the Discard button.&amp;nbsp; When the refresh button is used, this is not usually the case.&amp;nbsp; Even if it was, it just means that there is nothing on your undo stack and therefore none on ours (so clearing ours again would not cause any side-effects).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought you would like to know what I found.&amp;nbsp; I've implemented this logic into our handler and it is working exactly as I hoped - discard will discard the edits and I can handle that&amp;nbsp;accordingly.&amp;nbsp; And I can ignore the refresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize this check only works when there is one data store (i.e. single file geodatabase).&amp;nbsp; But this is just a short-term, temporary way to handle the issue.&amp;nbsp; We plan to support multiple geodatabases (a 1-1 relationship between gdb and one of our projects).&amp;nbsp; I'll add additional logic to handle that once we get to that point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Aug 2020 11:11:44 GMT</pubDate>
    <dc:creator>KrisCulin</dc:creator>
    <dc:date>2020-08-04T11:11:44Z</dc:date>
    <item>
      <title>Redraw Triggers Discard EditOperation</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/redraw-triggers-discard-editoperation/m-p/813676#M2443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've been working to handle several use cases around the EditCompletedType via the EditCompleted event.&amp;nbsp; One of them is EditCompletedType.Discard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, i found that when Redraw is called thru code or the refresh button in the UI (in&amp;nbsp;the status bar) are used, it triggers an EditOperation using EditCompleteType.Discard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The comments for EditCompleted.Discard read&lt;/P&gt;&lt;P&gt;Indicates this EditCompletedEvent discards outstanding edits to the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This interferes with the Discard button on the Edit tab.&amp;nbsp; I need to know when this button is pressed so I can sync our own undo operations with ArcGIS Pro's.&amp;nbsp; However, Discard is used in two distinct use cases and I cannot find any difference between them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two Questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Assuming you can confirm this finding (I've attached a simple add-in that reproduces it), will it be patched ASAP?&lt;/P&gt;&lt;P&gt;2. Is there a work around?&amp;nbsp; Is there a way to distinguish the Discard between a refresh and clicking the Discard button?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently using ArcGIS Pro SDK 2.5.&amp;nbsp; We plan to update to 2.6 in the very near future.&amp;nbsp; If the fix will be in 2.6 it will move us quicker to that version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2020 17:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/redraw-triggers-discard-editoperation/m-p/813676#M2443</guid>
      <dc:creator>KrisCulin</dc:creator>
      <dc:date>2020-07-29T17:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Redraw Triggers Discard EditOperation</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/redraw-triggers-discard-editoperation/m-p/813677#M2444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kris,&lt;/P&gt;&lt;P&gt;Yes I can confirm this is an issue in 2.5 and unfortunately 2.6.&lt;/P&gt;&lt;P&gt;It is planned to be fixed in 2.7. I cant think&amp;nbsp;of any reliable workarounds.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2020 00:36:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/redraw-triggers-discard-editoperation/m-p/813677#M2444</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-07-31T00:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Redraw Triggers Discard EditOperation</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/redraw-triggers-discard-editoperation/m-p/813678#M2445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any possibility of a patch?&amp;nbsp; Or is it too complicated to patch the issue? (I know the feeling).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I ask is that we keep our own undo stack in sync with AGP's.&amp;nbsp; If a user uses the Discard button the undo stacks&amp;nbsp;are no longer in-sync within each other and that will cause unknown issues.&amp;nbsp; Since the Redraw and Discard buttons have no distinguishing difference in the EditCompletedEventArgs,&amp;nbsp;we have no way of know when we should be handling it at the right time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We plan to release our product in September that works within ArcGIS Pro.&amp;nbsp; We will most likely use the 2.6 SDK and require our users to be on ArcGIS Pro 2.6 (not&amp;nbsp;officially decided but it is most likely).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if there is any way to get a patch released to fix this issue it would be greatly - more than - appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2020 00:44:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/redraw-triggers-discard-editoperation/m-p/813678#M2445</guid>
      <dc:creator>KrisCulin</dc:creator>
      <dc:date>2020-07-31T00:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Redraw Triggers Discard EditOperation</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/redraw-triggers-discard-editoperation/m-p/813679#M2446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After taking another crack at this issue,&amp;nbsp;I figured out a work around for us to use for the short-term until a patch can be provided (preferred, of course).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that in the EditCompleted event handler, if I check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Project.Current.HasEdits &amp;amp;&amp;amp;&amp;nbsp;Project.Current.EditedDataStores.Length == 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that this is only occurring when you use the Discard button.&amp;nbsp; When the refresh button is used, this is not usually the case.&amp;nbsp; Even if it was, it just means that there is nothing on your undo stack and therefore none on ours (so clearing ours again would not cause any side-effects).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought you would like to know what I found.&amp;nbsp; I've implemented this logic into our handler and it is working exactly as I hoped - discard will discard the edits and I can handle that&amp;nbsp;accordingly.&amp;nbsp; And I can ignore the refresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I realize this check only works when there is one data store (i.e. single file geodatabase).&amp;nbsp; But this is just a short-term, temporary way to handle the issue.&amp;nbsp; We plan to support multiple geodatabases (a 1-1 relationship between gdb and one of our projects).&amp;nbsp; I'll add additional logic to handle that once we get to that point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Aug 2020 11:11:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/redraw-triggers-discard-editoperation/m-p/813679#M2446</guid>
      <dc:creator>KrisCulin</dc:creator>
      <dc:date>2020-08-04T11:11:44Z</dc:date>
    </item>
  </channel>
</rss>

