<?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: Flash feature from proWindow in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834998#M3510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, that makes sense now.&amp;nbsp; Yes, this will be a problem.&amp;nbsp; Besides running your work&amp;nbsp;on an asynchronous thread,&amp;nbsp;&lt;SPAN&gt;QueuedTask.Run is&amp;nbsp;also used to manage the ArcGIS Pro state, meaning that tasks like drawing, selection, geometry, and apparently cursor operations are 'serialized' and executed in a certain sequence.&amp;nbsp; So if you execute a modal dialog from within such an operation you in effect 'block' the next&amp;nbsp;QueuedTask.Run task, which in your case is the flashing of the geometry from within your dialog.&amp;nbsp; You can bring up the ArcGIS Pro Diagnostic Monitor using the (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;Alt + Ctrl + M keys from within ArcGIS Pro) to view the health of ArcGIS Pro's threads.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;In order to get this to work properly you have to change your workflow a bit.&amp;nbsp; In your rowcursor you have to fill a collection of object ids, geometries (make sure to clone), etc. (collect whatever you need for your business logic) and once the collection is complete (you are done with queuedtask.run and back on the UI thread) you can then use that collection to process your records one by one.&amp;nbsp; Flashing of geometries, updating of records, etc. should work unhindered.&amp;nbsp; I have used this in the past especially for bulk updates or deletes.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2020 17:40:29 GMT</pubDate>
    <dc:creator>Wolf</dc:creator>
    <dc:date>2020-04-14T17:40:29Z</dc:date>
    <item>
      <title>Flash feature from proWindow</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834994#M3506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a button on a proWindow that is attempting to flash a feature on the map. I use ShowDialog to show the proWindow which freezes the application so the user can interact with the window. When the button is clicked on the proWindow, the application just freezes and the feature is not flashed. I have attached the code that shows the implementation of the button that should flash the feature in the view model.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="488368" alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/488368_FlashButton.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below is how I am instantiating the proWindow&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="488411" alt="" class="jive-emoji jive-image image-2 j-img-original" src="https://community.esri.com/legacyfs/online/488411_ProWindow.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/10927"&gt;Wolfgang Kaiser&lt;/A&gt;‌ &lt;A href="https://community.esri.com/migrated-users/86730"&gt;Uma Harano&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2020 20:03:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834994#M3506</guid>
      <dc:creator>MarvisKisakye1</dc:creator>
      <dc:date>2020-04-13T20:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Flash feature from proWindow</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834995#M3507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this using a Modal ProWindow and didn't experience the hang:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/488410_Dialog.png" /&gt;&lt;/P&gt;&lt;P&gt;and the selected polygon is flashed as expected, using the code snippet below.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;      &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; oid &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;long&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Parse&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ObjectId&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Text&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; layerName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; FeatureLayerName&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Text&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; lineLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetLayersAsFlattenedList&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;OfType&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;FeatureLayer&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="token function"&gt;Where&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
          lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; layerName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;FirstOrDefault&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;as&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; QueuedTask&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Run&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="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
       &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
         MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;FlashFeature&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lineLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; oid&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="punctuation token"&gt;}&lt;/SPAN&gt;
      &lt;SPAN class="keyword token"&gt;catch&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token class-name"&gt;Exception&lt;/SPAN&gt; ex&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        MessageBox&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Show&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$&lt;SPAN class="string token"&gt;@"Exception: {ex.Message}"&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I will try MVVM next, but i can't imagine that this makes a difference.&amp;nbsp; Try surrounding your code with a try ... catch ... just in case there's issues with code itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:07:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834995#M3507</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-12-12T10:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Flash feature from proWindow</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834996#M3508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried the Mvvm version of ProWindow as well and was not able to duplicate the issue you reported.&amp;nbsp; i am using 2.5 of the Pro SDK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Apr 2020 23:01:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834996#M3508</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-04-13T23:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Flash feature from proWindow</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834997#M3509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/10927"&gt;Wolfgang Kaiser&lt;/A&gt;, I don't know if you can tell from my code but I am opening the proWindow from inside a rowCursor (I open a proWindow for each row as I loop through). I utilise the Using statement which has to be inside a queuedTask.Run. To open the proWindow inside the &lt;SPAN&gt;queuedTask.Run&lt;/SPAN&gt;, I am using&amp;nbsp;Application.Current.Dispatcher.Invoke to push the proWindow out to the main thread. I believe this is the source of my problems. When I just open the proWindow with the click of a button, the flashing works fine but the issue comes when I open the proWindow from inside the cursor (utilising&amp;nbsp;&lt;SPAN&gt;Application.Current.Dispatcher.Invoke). When the proWindow is opened this way, the flashing of the feature just hangs and never happens. I added a try catch but I don't receive any messages because the application just hangs once I click the button.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2020 02:07:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834997#M3509</guid>
      <dc:creator>MarvisKisakye1</dc:creator>
      <dc:date>2020-04-14T02:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Flash feature from proWindow</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834998#M3510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, that makes sense now.&amp;nbsp; Yes, this will be a problem.&amp;nbsp; Besides running your work&amp;nbsp;on an asynchronous thread,&amp;nbsp;&lt;SPAN&gt;QueuedTask.Run is&amp;nbsp;also used to manage the ArcGIS Pro state, meaning that tasks like drawing, selection, geometry, and apparently cursor operations are 'serialized' and executed in a certain sequence.&amp;nbsp; So if you execute a modal dialog from within such an operation you in effect 'block' the next&amp;nbsp;QueuedTask.Run task, which in your case is the flashing of the geometry from within your dialog.&amp;nbsp; You can bring up the ArcGIS Pro Diagnostic Monitor using the (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;Alt + Ctrl + M keys from within ArcGIS Pro) to view the health of ArcGIS Pro's threads.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; color: black;"&gt;&amp;nbsp;In order to get this to work properly you have to change your workflow a bit.&amp;nbsp; In your rowcursor you have to fill a collection of object ids, geometries (make sure to clone), etc. (collect whatever you need for your business logic) and once the collection is complete (you are done with queuedtask.run and back on the UI thread) you can then use that collection to process your records one by one.&amp;nbsp; Flashing of geometries, updating of records, etc. should work unhindered.&amp;nbsp; I have used this in the past especially for bulk updates or deletes.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2020 17:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834998#M3510</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2020-04-14T17:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Flash feature from proWindow</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834999#M3511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using a collection worked perfectly. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2020 17:42:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/flash-feature-from-prowindow/m-p/834999#M3511</guid>
      <dc:creator>MarvisKisakye1</dc:creator>
      <dc:date>2020-04-16T17:42:58Z</dc:date>
    </item>
  </channel>
</rss>

