<?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: Select shapefiles using OpenItemDialog in Pro SDK in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880683#M5655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;Thanks! I can provide more information now after additional testing. The code to open&amp;nbsp;the OpenItemDialog is executed from a Pro button. When I launch Pro and click the button for the first time, the &lt;SPAN style="font-family: Consolas; font-size: small;"&gt;OpenItemDialog &lt;/SPAN&gt;loads, but it shows all types of shapefiles (file geodatabases are excluded). After I cancel from the dialog and click the button again, the OpenItemDialog now correctly shows only line shapefiles. From this point on the filter works correctly. Any ideas why this is happening?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;Here is the &lt;SPAN style="font-family: Consolas; font-size: small;"&gt;BrowseProjectFilter configuration:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;BrowseProjectFilter browseFilter = BrowseProjectFilter.GetFilter(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"esri_browseDialogFilters_shapefiles"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; browseFilter.AddCanBeTypeId(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas; "&gt;"shapefile_general"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; browseFilter.AddMustNotBeTypeId(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas; "&gt;"shapefile_polygon"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; browseFilter.AddMustNotBeTypeId(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas; "&gt;"shapefile_point"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Nov 2020 00:40:42 GMT</pubDate>
    <dc:creator>AlexZlotin1</dc:creator>
    <dc:date>2020-11-06T00:40:42Z</dc:date>
    <item>
      <title>Select shapefiles using OpenItemDialog in Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880679#M5651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to configure BrowseProjectFilter of&amp;nbsp;OpenItemDialog so only line shapefiles can be selected. Here is the code I am using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BrowseProjectFilter browseFilter = BrowseProjectFilter.GetFilter("esri_browseDialogFilters_shapefiles");&lt;/P&gt;&lt;P&gt;OpenItemDialog browseDialog = new OpenItemDialog&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Title = "Select&amp;nbsp;line shapefile",&lt;BR /&gt;&amp;nbsp; &amp;nbsp;MultiSelect = false,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;BrowseFilter = browseFilter&lt;BR /&gt; };&lt;BR /&gt; browseDialog.ShowDialog();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns shapefiles of all geometry types. Is there a way to configure the filter to display shapefiles with line geometry type only? I have tried applying the AddCanBeTypeId below but it does not make any difference.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;browseFilter.AddCanBeTypeId("shapefile_line");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using Pro 2.6 SDK. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Nov 2020 20:07:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880679#M5651</guid>
      <dc:creator>AlexZlotin1</dc:creator>
      <dc:date>2020-11-03T20:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Select shapefiles using OpenItemDialog in Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880680#M5652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I added the "shapefile_general" typeID to get this to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;BrowseProjectFilter browseFilter &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; BrowseProjectFilter&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetFilter&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"esri_browseDialogFilters_shapefiles"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
browseFilter&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;AddCanBeTypeId&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"shapefile_general"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
browseFilter&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;AddCanBeTypeId&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"shapefile_line"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
OpenItemDialog browseDialog &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;OpenItemDialog&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:07:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880680#M5652</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2021-12-12T11:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: Select shapefiles using OpenItemDialog in Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880681#M5653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Uma! This is not working for me though. The filter alone without AddCanBeTypeId's shows shapefiles of all geometry types:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BrowseProjectFilter browseFilter = BrowseProjectFilter.GetFilter("esri_browseDialogFilters_shapefiles");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;OpenItemDialog browseDialog = new OpenItemDialog {….}&lt;/STRONG&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;With the AddCanBeTypeId lines added, I still see shapefiles of all geometry types. I also see file geodatabases located in the same folder, and can navigate to the feature classes in the file geodatabases:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;BrowseProjectFilter browseFilter = BrowseProjectFilter.GetFilter("esri_browseDialogFilters_shapefiles");&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;browseFilter.AddCanBeTypeId("shapefile_general");&lt;BR /&gt;browseFilter.AddCanBeTypeId("shapefile_line");&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;OpenItemDialog browseDialog = new OpenItemDialog {….}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Nov 2020 22:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880681#M5653</guid>
      <dc:creator>AlexZlotin1</dc:creator>
      <dc:date>2020-11-04T22:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select shapefiles using OpenItemDialog in Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880682#M5654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;Can you try using the&amp;nbsp;AddMustNotBeTypeId method to pass in the typeIDs to not display?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;BrowseProjectFilter browseFilter = BrowseProjectFilter.GetFilter("esri_browseDialogFilters_shapefiles");
browseFilter.AddCanBeTypeId("shapefile_general");
browseFilter.AddCanBeTypeId("shapefile_line");
browseFilter.AddMustNotBeTypeId("shapefile_point");
//Add other typeIDs of shape files to not show.
&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, this is how my dialog looks (below). I have a file GDB in this location. I don't see it nor am I able to browse into it.&amp;nbsp; So not sure what is happening there.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="308" src="https://community.esri.com/legacyfs/online/512625_pastedImage_1.png" width="588" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:07:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880682#M5654</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2021-12-12T11:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Select shapefiles using OpenItemDialog in Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880683#M5655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;Thanks! I can provide more information now after additional testing. The code to open&amp;nbsp;the OpenItemDialog is executed from a Pro button. When I launch Pro and click the button for the first time, the &lt;SPAN style="font-family: Consolas; font-size: small;"&gt;OpenItemDialog &lt;/SPAN&gt;loads, but it shows all types of shapefiles (file geodatabases are excluded). After I cancel from the dialog and click the button again, the OpenItemDialog now correctly shows only line shapefiles. From this point on the filter works correctly. Any ideas why this is happening?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;Here is the &lt;SPAN style="font-family: Consolas; font-size: small;"&gt;BrowseProjectFilter configuration:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;BrowseProjectFilter browseFilter = BrowseProjectFilter.GetFilter(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-family: Consolas; font-size: small;"&gt;"esri_browseDialogFilters_shapefiles"&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; browseFilter.AddCanBeTypeId(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas; "&gt;"shapefile_general"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; browseFilter.AddMustNotBeTypeId(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas; "&gt;"shapefile_polygon"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt; browseFilter.AddMustNotBeTypeId(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; font-size: small; font-family: Consolas; "&gt;"shapefile_point"&lt;/SPAN&gt;&lt;SPAN style="font-size: small; font-family: Consolas; "&gt;);&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2020 00:40:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880683#M5655</guid>
      <dc:creator>AlexZlotin1</dc:creator>
      <dc:date>2020-11-06T00:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select shapefiles using OpenItemDialog in Pro SDK</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880684#M5656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;Can you make a small sample add-in project with just this button and send it to me?&lt;/P&gt;&lt;P&gt;An attachment posted here will work. I can take a look and see if I can help.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Uma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2020 00:44:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/select-shapefiles-using-openitemdialog-in-pro-sdk/m-p/880684#M5656</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2020-11-06T00:44:54Z</dc:date>
    </item>
  </channel>
</rss>

