<?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 OpenItemDialog issue with existing Project Item in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/openitemdialog-issue-with-existing-project-item/m-p/1171115#M8097</link>
    <description>&lt;P&gt;I have a process where users can migrate a database from the ArcMap version of our tool to the Pro version. Users select their existing GDB using the OpenItemDialog, but if they've already added it to the project and select it from the Project section (highlighted), the Items collection is empty. Is there a way to access the selected Project Item? I'm using SDK 2.9.2.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StephenRhea_AximGeo_0-1651763706536.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/40680i4E6610B6810E4426/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StephenRhea_AximGeo_0-1651763706536.png" alt="StephenRhea_AximGeo_0-1651763706536.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Selection code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var picker = new ArcGIS.Desktop.Catalog.OpenItemDialog
{
    AlwaysUseInitialLocation = true,
    InitialLocation = Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
    BrowseFilter = new ArcGIS.Desktop.Core.BrowseProjectFilter(DAML.Component.esri_browseDialogFilters_geodatabases_file),
    MultiSelect = false,
    Title = "Legacy File Geodatabase"
};

picker.ShowDialog();
var selection = picker.Items.FirstOrDefault();

if (selection == null)
{
    // *** Selecting an existing Project Item goes here.
    MessageBox.Show("No item selected");
}
else
{
    // Run migration
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 15:43:28 GMT</pubDate>
    <dc:creator>tempStephenRhea_NV5</dc:creator>
    <dc:date>2022-05-05T15:43:28Z</dc:date>
    <item>
      <title>OpenItemDialog issue with existing Project Item</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/openitemdialog-issue-with-existing-project-item/m-p/1171115#M8097</link>
      <description>&lt;P&gt;I have a process where users can migrate a database from the ArcMap version of our tool to the Pro version. Users select their existing GDB using the OpenItemDialog, but if they've already added it to the project and select it from the Project section (highlighted), the Items collection is empty. Is there a way to access the selected Project Item? I'm using SDK 2.9.2.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StephenRhea_AximGeo_0-1651763706536.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/40680i4E6610B6810E4426/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StephenRhea_AximGeo_0-1651763706536.png" alt="StephenRhea_AximGeo_0-1651763706536.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Selection code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var picker = new ArcGIS.Desktop.Catalog.OpenItemDialog
{
    AlwaysUseInitialLocation = true,
    InitialLocation = Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
    BrowseFilter = new ArcGIS.Desktop.Core.BrowseProjectFilter(DAML.Component.esri_browseDialogFilters_geodatabases_file),
    MultiSelect = false,
    Title = "Legacy File Geodatabase"
};

picker.ShowDialog();
var selection = picker.Items.FirstOrDefault();

if (selection == null)
{
    // *** Selecting an existing Project Item goes here.
    MessageBox.Show("No item selected");
}
else
{
    // Run migration
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 15:43:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/openitemdialog-issue-with-existing-project-item/m-p/1171115#M8097</guid>
      <dc:creator>tempStephenRhea_NV5</dc:creator>
      <dc:date>2022-05-05T15:43:28Z</dc:date>
    </item>
  </channel>
</rss>

