<?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: SketchEditor UndoCommand in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444456#M5374</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your workaround, it temporary helps us.&lt;/P&gt;&lt;P&gt;I just want to point out that the wrong behaviour occurs at deleted vertices too (not only in case of dragging them).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an esri bug number or issue ticket or similar?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2019 11:11:31 GMT</pubDate>
    <dc:creator>KarinGisperg1</dc:creator>
    <dc:date>2019-01-28T11:11:31Z</dc:date>
    <item>
      <title>SketchEditor UndoCommand</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444454#M5372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are developing an application based on ArcGIS Runtime .NET 100.3, .Net Framework 4.7.1 , Windows 10 64bit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For polygon&amp;nbsp;feature edit operations we use the the sketch editor using different modes: &lt;BR /&gt;We trigger the &amp;lt;command&amp;gt;.Execute&amp;nbsp;in the code (for selected workflows)&lt;/P&gt;&lt;P&gt;(MyMapView.SketchEditor.AddCommand.Execute(insertPoint); MyMapView.SketchEditor.MoveSelectedVertex(newPosition); ... MyMapView.SketchEditor.UndoCommand.Execute(...);); &lt;BR /&gt;Additionally, the user is allowed to edit the geometry interactively on the mapview&lt;/P&gt;&lt;P&gt;(AllowVertexEditing = true,&lt;/P&gt;&lt;P&gt;SketchVertexEditMode VertexEditMode = InteractionEdit;&lt;/P&gt;&lt;P&gt;RequireSelectionBeforeDrag = false; ... )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our question is: What does the UndoCommand exactly "undo"?&lt;/P&gt;&lt;P&gt;Our expectation is, that the last operation is rollbacked, but we observed following behaviour (check the attached videos):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Move - Undo&lt;BR /&gt;- In case of moving an arbitrary vertex interactively, the undo command does not reset the original position, but DELETES the moved point.&lt;BR /&gt;- same behaviour when using MyMapView.SketchEditor.MoveSelectedVertex(newPosition);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Delete - Undo&lt;BR /&gt;- In case of deleting an arbitrary selected vertex, the undo command does not recreate the deleted point, but deletes the vertex subsequent to the deleted point ???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this behaviour "as designed" ?&lt;BR /&gt;Is there a detailled description in the APIreference documentation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;BR /&gt;Karin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Jan 2019 11:41:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444454#M5372</guid>
      <dc:creator>KarinGisperg1</dc:creator>
      <dc:date>2019-01-21T11:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: SketchEditor UndoCommand</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444455#M5373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your feedback. This appears to be a regression between v100.2.1 and v100.3 that dragging vertex or geometry is not part of the undo stack. I have logged an issue for this so we can fix in future releases of the API. Meanwhile, you may use GeometryChanged event to track the old geometry to be restored on Undo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UndoCommand is meant to bring back the previous state of geometry. When a new vertex was added, the new vertex will be removed. When a vertex is deleted, the deleted vertex is added back. When a vertex is moved, the moved vertex is moved back to its previous location. When the geometry is scaled, rotated or resized, its previous shape and location is restored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possible workaround:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;public&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;MainWindow&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;InitializeComponent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SketchEditor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GeometryChanged &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; undoStack&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Push&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OldGeometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;readonly&lt;/SPAN&gt; Stack&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Geometry&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; undoStack &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Stack&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Geometry&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;private&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnUndo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;object&lt;/SPAN&gt; sender&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; RoutedEventArgs e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyMapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SketchEditor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ReplaceGeometry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;undoStack&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Pop&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:52:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444455#M5373</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T19:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: SketchEditor UndoCommand</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444456#M5374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your workaround, it temporary helps us.&lt;/P&gt;&lt;P&gt;I just want to point out that the wrong behaviour occurs at deleted vertices too (not only in case of dragging them).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an esri bug number or issue ticket or similar?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2019 11:11:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444456#M5374</guid>
      <dc:creator>KarinGisperg1</dc:creator>
      <dc:date>2019-01-28T11:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: SketchEditor UndoCommand</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444457#M5375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the follow-up. Undo from move or delete are both addressed in the same issue. I don't have a reference number I can share but fix is on&amp;nbsp;its way for next release.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2019 21:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444457#M5375</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2019-01-30T21:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: SketchEditor UndoCommand</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444458#M5376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rounding out this thread - this issue was&amp;nbsp;resolved in the v100.5 release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2019 04:46:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/444458#M5376</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2019-07-02T04:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: SketchEditor UndoCommand</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/1026903#M9794</link>
      <description>&lt;P&gt;I'm seeing the problem in 100.10 when calling MoveSelectedVertex, followed by executing the UndoCommand. The vertex that was moved is deleted on the Undo.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-runtime-sdk-for-net/potential-bug-with-sketcheditor-when-undoing-movevertex/m-p/1026901#M9793" target="_blank"&gt;https://community.esri.com/t5/arcgis-runtime-sdk-for-net/potential-bug-with-sketcheditor-when-undoing-movevertex/m-p/1026901#M9793&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 16:36:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/sketcheditor-undocommand/m-p/1026903#M9794</guid>
      <dc:creator>ChristopherPalmer99</dc:creator>
      <dc:date>2021-02-15T16:36:02Z</dc:date>
    </item>
  </channel>
</rss>

