<?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 Getting Selection Area in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/getting-selection-area/m-p/1279266#M9687</link>
    <description>&lt;P&gt;I think I know the answer to this but here goes.&amp;nbsp; What I need (beyond the selected features) is the geometry of the selection area in map coordinates.&amp;nbsp; What I'd like is to simply use what is already provided since that works great:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RussellSuter_0-1681743420953.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/68152i774C4DFE7C7AE40C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RussellSuter_0-1681743420953.png" alt="RussellSuter_0-1681743420953.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I see where I can use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;MapSelectionChangedEvent.Subscribe(OnSelectionChanged);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to be notified when the selection is made and I get the features selected:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;private void OnSelectionChanged(MapSelectionChangedEventArgs args)
{
    if (args.Map != _activeMap)
        return;

    UpdateForActiveMap(false, args.Selection.ToDictionary());
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this, I'm not seeing how to get the geometry of the selection area.&amp;nbsp; Is there a way to get the selection area without writing a whole new selection tool ala:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/FeatureSelection" target="_blank" rel="noopener"&gt;FeatureSelectionTool&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Apr 2023 15:14:20 GMT</pubDate>
    <dc:creator>RussellSuter</dc:creator>
    <dc:date>2023-04-17T15:14:20Z</dc:date>
    <item>
      <title>Getting Selection Area</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/getting-selection-area/m-p/1279266#M9687</link>
      <description>&lt;P&gt;I think I know the answer to this but here goes.&amp;nbsp; What I need (beyond the selected features) is the geometry of the selection area in map coordinates.&amp;nbsp; What I'd like is to simply use what is already provided since that works great:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RussellSuter_0-1681743420953.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/68152i774C4DFE7C7AE40C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RussellSuter_0-1681743420953.png" alt="RussellSuter_0-1681743420953.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I see where I can use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;MapSelectionChangedEvent.Subscribe(OnSelectionChanged);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to be notified when the selection is made and I get the features selected:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;private void OnSelectionChanged(MapSelectionChangedEventArgs args)
{
    if (args.Map != _activeMap)
        return;

    UpdateForActiveMap(false, args.Selection.ToDictionary());
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this, I'm not seeing how to get the geometry of the selection area.&amp;nbsp; Is there a way to get the selection area without writing a whole new selection tool ala:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/tree/master/Map-Exploration/FeatureSelection" target="_blank" rel="noopener"&gt;FeatureSelectionTool&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 15:14:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/getting-selection-area/m-p/1279266#M9687</guid>
      <dc:creator>RussellSuter</dc:creator>
      <dc:date>2023-04-17T15:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Selection Area</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/getting-selection-area/m-p/1279474#M9694</link>
      <description>&lt;P&gt;The input geometry is not passed through to the event handler.&amp;nbsp; You can easily write your own tool by creating a MapTool, then changing the SketchType (Rectangle, Line, Polygon etc.), and adding these lines to the&amp;nbsp;OnSketchCompleteAsync method:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;protected override Task&amp;lt;bool&amp;gt; OnSketchCompleteAsync(Geometry geometry)
{
  QueuedTask.Run(() =&amp;gt;
  {
    var selectionSet = MapView.Active.SelectFeatures(geometry);
    OnMySelectionEvent(geometry, selectionSet);
  });
  return base.OnSketchCompleteAsync(geometry);
}&lt;/LI-CODE&gt;&lt;P&gt;Now you call your own event handler passing in the selection and the geometry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 23:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/getting-selection-area/m-p/1279474#M9694</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-04-17T23:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Selection Area</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/getting-selection-area/m-p/1279683#M9700</link>
      <description>&lt;P&gt;Yes. That's what I expected.&amp;nbsp; It is unfortunate that I need to replicate what is already there and working.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 14:41:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/getting-selection-area/m-p/1279683#M9700</guid>
      <dc:creator>RussellSuter</dc:creator>
      <dc:date>2023-04-18T14:41:59Z</dc:date>
    </item>
  </channel>
</rss>

