<?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 Open/Save/Coordsys Dialog Error in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-save-coordsys-dialog-error/m-p/869506#M5096</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;At 2.5 still having issues getting dialogs to show correctly when used from within QueuedTask.Run.&lt;/P&gt;&lt;P&gt;The Coordinate System Dialog is the one from the snippet collection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works from a button&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;protected override void OnClick()&lt;BR /&gt; {&lt;BR /&gt;new SaveItemDialog().ShowDialog();&lt;/P&gt;&lt;P&gt;new CoordinateSystemDialog().ShowDialog();&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So does this&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;protected override void OnClick()&lt;BR /&gt; {&lt;BR /&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt; new SaveItemDialog().ShowDialog());&lt;/P&gt;&lt;P&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt; { new CoordinateSystemDialog().ShowDialog(); });&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this does not.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;protected override void OnClick()&lt;BR /&gt; {&lt;BR /&gt; QueuedTask.Run(&lt;BR /&gt; () =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt; new SaveItemDialog().ShowDialog());&lt;/P&gt;&lt;P&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt; { new CoordinateSystemDialog().ShowDialog(); });&lt;BR /&gt; });&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The coordinate system dialog never completes loading. The Open/Save Dialogs do not show the contents of a fgdb. If I run the command again in the same session then the Open/Save Dialogs show the contents of a fgdb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a workaround&amp;nbsp;whilst it's being fixed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Mar 2020 15:24:28 GMT</pubDate>
    <dc:creator>AdamDavis</dc:creator>
    <dc:date>2020-03-03T15:24:28Z</dc:date>
    <item>
      <title>Open/Save/Coordsys Dialog Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-save-coordsys-dialog-error/m-p/869506#M5096</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;At 2.5 still having issues getting dialogs to show correctly when used from within QueuedTask.Run.&lt;/P&gt;&lt;P&gt;The Coordinate System Dialog is the one from the snippet collection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works from a button&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;protected override void OnClick()&lt;BR /&gt; {&lt;BR /&gt;new SaveItemDialog().ShowDialog();&lt;/P&gt;&lt;P&gt;new CoordinateSystemDialog().ShowDialog();&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So does this&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;protected override void OnClick()&lt;BR /&gt; {&lt;BR /&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt; new SaveItemDialog().ShowDialog());&lt;/P&gt;&lt;P&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt; { new CoordinateSystemDialog().ShowDialog(); });&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this does not.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;protected override void OnClick()&lt;BR /&gt; {&lt;BR /&gt; QueuedTask.Run(&lt;BR /&gt; () =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt; new SaveItemDialog().ShowDialog());&lt;/P&gt;&lt;P&gt;FrameworkApplication.Current.Dispatcher.Invoke(() =&amp;gt; { new CoordinateSystemDialog().ShowDialog(); });&lt;BR /&gt; });&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The coordinate system dialog never completes loading. The Open/Save Dialogs do not show the contents of a fgdb. If I run the command again in the same session then the Open/Save Dialogs show the contents of a fgdb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a workaround&amp;nbsp;whilst it's being fixed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2020 15:24:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-save-coordsys-dialog-error/m-p/869506#M5096</guid>
      <dc:creator>AdamDavis</dc:creator>
      <dc:date>2020-03-03T15:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Open/Save/Coordsys Dialog Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-save-coordsys-dialog-error/m-p/869507#M5097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In general, calling a modal dialog from the queued task should be avoided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;protected&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;override&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;OnClick&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="comment token"&gt;//construct on the UI&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; dlg &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;SaveItemDialog&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;
    dlg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Title &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"On QueuedTask"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&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;
	FrameworkApplication&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Current&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Dispatcher&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Invoke&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;
	  &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; dlg&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ShowDialog&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="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="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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:50:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-save-coordsys-dialog-error/m-p/869507#M5097</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2021-12-12T10:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Open/Save/Coordsys Dialog Error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-save-coordsys-dialog-error/m-p/869508#M5098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Charles,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the code. I tried that and no difference - the first time the button is used entering a filegdb gives an infinitely scrolling wait icon. The 2nd time the button is used it shows the contents immediately.&lt;/P&gt;&lt;P&gt;it would be great if this could be made to work within the API whilst in QueuedTask.Run(). The realities of a very large code base don't always allow for being able to nip on/off the MCT at will. We have a code base that is entirely synchronous and are so are pragmatically wrapping our entire command in a single QueuedTask.Run().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/484475_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:30:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/open-save-coordsys-dialog-error/m-p/869508#M5098</guid>
      <dc:creator>AdamDavis</dc:creator>
      <dc:date>2020-03-09T16:30:41Z</dc:date>
    </item>
  </channel>
</rss>

