<?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 ArcGIS Pro 2.3 SDK Issue in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-2-3-sdk-issue/m-p/822129#M2872</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since switching to ArcGIS Pro 2.3 my addin is giving me trouble.&amp;nbsp; &amp;nbsp;Calls to asynchronous task are not waiting to complete before the next task starts.&amp;nbsp; Here is a snippet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private async void btnGo_Click(object sender, RoutedEventArgs e)&lt;BR /&gt;{&lt;BR /&gt; await ImportTemplate(); &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;private async Task ImportTemplate()&lt;BR /&gt;{&lt;BR /&gt; lblProgress.Content = "Importing template...";&lt;BR /&gt; string mxd = @"N:\Support\ArcGIS\Tools\MailingList\MailingLabelsRequest_TemplatePro.mxd";&lt;BR /&gt; Item mxdItem = ItemFactory.Instance.Create(mxd, ItemFactory.ItemType.PathItem);&lt;BR /&gt; await QueuedTask.Run(() =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt; MapFactory.Instance.CreateMapFromItem(mxdItem);&lt;BR /&gt; });&lt;BR /&gt; lblProgress.Content = "Rename Layout...";&lt;BR /&gt; m_wsName = txtProjectName.Text.Replace(" ", "");&lt;BR /&gt; mapName = String.Concat(m_wsName, "_", SizeUnits);&lt;BR /&gt; await QueuedTask.Run(() =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt; LayoutView.Active.Layout.SetName(mapName);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the second QueuedTask starts before the first one completes and it dependent on the first one to complete.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Feb 2019 17:18:21 GMT</pubDate>
    <dc:creator>MichaelStranovsky</dc:creator>
    <dc:date>2019-02-15T17:18:21Z</dc:date>
    <item>
      <title>ArcGIS Pro 2.3 SDK Issue</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-2-3-sdk-issue/m-p/822129#M2872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since switching to ArcGIS Pro 2.3 my addin is giving me trouble.&amp;nbsp; &amp;nbsp;Calls to asynchronous task are not waiting to complete before the next task starts.&amp;nbsp; Here is a snippet:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;private async void btnGo_Click(object sender, RoutedEventArgs e)&lt;BR /&gt;{&lt;BR /&gt; await ImportTemplate(); &lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;private async Task ImportTemplate()&lt;BR /&gt;{&lt;BR /&gt; lblProgress.Content = "Importing template...";&lt;BR /&gt; string mxd = @"N:\Support\ArcGIS\Tools\MailingList\MailingLabelsRequest_TemplatePro.mxd";&lt;BR /&gt; Item mxdItem = ItemFactory.Instance.Create(mxd, ItemFactory.ItemType.PathItem);&lt;BR /&gt; await QueuedTask.Run(() =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt; MapFactory.Instance.CreateMapFromItem(mxdItem);&lt;BR /&gt; });&lt;BR /&gt; lblProgress.Content = "Rename Layout...";&lt;BR /&gt; m_wsName = txtProjectName.Text.Replace(" ", "");&lt;BR /&gt; mapName = String.Concat(m_wsName, "_", SizeUnits);&lt;BR /&gt; await QueuedTask.Run(() =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt; LayoutView.Active.Layout.SetName(mapName);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the second QueuedTask starts before the first one completes and it dependent on the first one to complete.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2019 17:18:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/arcgis-pro-2-3-sdk-issue/m-p/822129#M2872</guid>
      <dc:creator>MichaelStranovsky</dc:creator>
      <dc:date>2019-02-15T17:18:21Z</dc:date>
    </item>
  </channel>
</rss>

