<?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: Programatically selecting features in Pro 3 API in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/programatically-selecting-features-in-pro-3-api/m-p/1190952#M8369</link>
    <description>&lt;P&gt;Thank you so much,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;. I appreciate your reply, and so does my blood pressure &amp;amp; sanity &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jul 2022 18:45:59 GMT</pubDate>
    <dc:creator>StuartBricker</dc:creator>
    <dc:date>2022-07-08T18:45:59Z</dc:date>
    <item>
      <title>Programatically selecting features in Pro 3 API</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/programatically-selecting-features-in-pro-3-api/m-p/1190934#M8367</link>
      <description>&lt;P&gt;In the 2.x API, I was able to set the map selection via the below code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;MapView.Active.Map.SetSelection(new Dictionary&amp;lt;MapMember, List&amp;lt;long&amp;gt;&amp;gt; { { bFl, oidList } });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;in 3.0, this code errors out, but the intellisense says that the SetSelection method takes a SelectionSet object as a parameter.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="selset.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/45573i70CC14E8CB0AF124/image-size/large?v=v2&amp;amp;px=999" role="button" title="selset.png" alt="selset.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, I cannot figure out how to instantiate a SelectionSet object. There is no useful information in the API reference for SelectionSet, and the only snippet for the .SetSelection()&amp;nbsp; method is how to clear the selection with&amp;nbsp;.SetSelection(null).&lt;/P&gt;&lt;P&gt;So I am at a loss. How does one programatically select features on the map with the new 3.0 API, given a BasicFeatureLayer object and a list of objectIDs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 18:18:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/programatically-selecting-features-in-pro-3-api/m-p/1190934#M8367</guid>
      <dc:creator>StuartBricker</dc:creator>
      <dc:date>2022-07-08T18:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically selecting features in Pro 3 API</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/programatically-selecting-features-in-pro-3-api/m-p/1190949#M8368</link>
      <description>&lt;P&gt;If you have the dictionary as in:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;selectionDictionary&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;SPAN&gt;new&lt;/SPAN&gt;&amp;nbsp;Dictionary&amp;lt;MapMember,&amp;nbsp;List&amp;lt;&lt;SPAN&gt;long&lt;/SPAN&gt;&amp;gt;&amp;gt;();&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;You can then use the static '&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic76773.html" target="_self"&gt;FromDictionary&lt;/A&gt;' method to create a selection set like this sample (from community samples) that uses a selection set to flash a set of corresponding features:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;await&lt;/SPAN&gt;&amp;nbsp;QueuedTask.Run(()&amp;nbsp;=&amp;gt;
{
	&lt;SPAN&gt;//Flash&amp;nbsp;the&amp;nbsp;collection&amp;nbsp;of&amp;nbsp;features.&lt;/SPAN&gt;
	&lt;SPAN&gt;var&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;selectionSet&lt;/SPAN&gt;&amp;nbsp;=&amp;nbsp;SelectionSet.FromDictionary(selectionDictionary);
	mapView.FlashFeature(selectionSet);
});&lt;/PRE&gt;&lt;P&gt;Also there is a sample in the&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-3.0-Migration-Guide" target="_self"&gt;3.0-Migration-Guide&lt;/A&gt;&amp;nbsp;that you can find if you search for "SelectionSet" or "FromDictionary".&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 18:35:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/programatically-selecting-features-in-pro-3-api/m-p/1190949#M8368</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2022-07-08T18:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically selecting features in Pro 3 API</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/programatically-selecting-features-in-pro-3-api/m-p/1190952#M8369</link>
      <description>&lt;P&gt;Thank you so much,&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;. I appreciate your reply, and so does my blood pressure &amp;amp; sanity &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 18:45:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/programatically-selecting-features-in-pro-3-api/m-p/1190952#M8369</guid>
      <dc:creator>StuartBricker</dc:creator>
      <dc:date>2022-07-08T18:45:59Z</dc:date>
    </item>
  </channel>
</rss>

