<?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: Arcgis Pro 2.9 ArcPy Get Selected Feature in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170638#M64486</link>
    <description>&lt;P&gt;Not sure in Pro as I have not looked into Add Ins for Pro, but in ArcMap, getting the map click point was fairly simple using an Add In.&lt;/P&gt;&lt;P&gt;Good example &lt;A href="https://ianbroad.com/google-street-view-python-addin-for-arcmap/" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
    <pubDate>Wed, 04 May 2022 15:11:52 GMT</pubDate>
    <dc:creator>RhettZufelt</dc:creator>
    <dc:date>2022-05-04T15:11:52Z</dc:date>
    <item>
      <title>Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170314#M64471</link>
      <description>&lt;P&gt;If a user selects a feature from the map by clicking,&amp;nbsp; can I use Python to get this selected feature?&amp;nbsp; I am from ArcObject and am learning ArcPy.&amp;nbsp; From the reference document and samples, I have not found a way to get the selected feature from the map directly.&amp;nbsp; I am wondering if ArcPy has classes/functions to interact with maps.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 19:21:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170314#M64471</guid>
      <dc:creator>YinghongLi1</dc:creator>
      <dc:date>2022-05-03T19:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170321#M64472</link>
      <description>&lt;P&gt;You'll want to get familiar with the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/introduction-to-arcpy-mp.htm" target="_self"&gt;arcpy.mp&lt;/A&gt; sub module. In general, you'll define a project, then identify a map in that project, then a layer in that map, then call the layer's&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layer-class.htm" target="_self"&gt;getSelectionSet ()&lt;/A&gt; method. This only gives you a list of objectId values for the selected features, not the actual feature. If you want access to the feature, use a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/data-access-using-cursors.htm" target="_self"&gt;data access cursor&lt;/A&gt;. Or, if you want to run a tool on the selected feature, you can usually just use the layer with the selection as the input and it will only run on the selection.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 19:34:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170321#M64472</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2022-05-03T19:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170389#M64475</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; I assume that there is no method that can get a map click point, right?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 21:07:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170389#M64475</guid>
      <dc:creator>YinghongLi1</dc:creator>
      <dc:date>2022-05-03T21:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170404#M64476</link>
      <description>&lt;P&gt;Interesting question. If you were making a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/a-quick-tour-of-python-toolboxes.htm" target="_self"&gt;Python Toolbox&lt;/A&gt;, I think you could use a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/defining-parameter-data-types-in-a-python-toolbox.htm#ESRI_SECTION1_A6F5518564FF4125B7C410F3DF3C3003" target="_self"&gt;&lt;SPAN&gt;GPFeatureRecordSetLayer&amp;nbsp;&lt;/SPAN&gt;parameter&lt;/A&gt;&lt;SPAN&gt;. In the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;getParameterInfo function of the tool,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;you would &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-feature-class.htm" target="_self"&gt;create a feature class&lt;/A&gt;&amp;nbsp;that outputs to a &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/the-in-memory-workspace.htm" target="_self"&gt;memory workspace&lt;/A&gt;, then &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/make-feature-layer.htm" target="_self"&gt;make a feature layer&lt;/A&gt; from the feature class, and set the value of the&amp;nbsp;GPFeatureRecordSetLayer parameter to the feature layer. This creates an input on the tool to draw a feature on the map.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I've seen this done in ArcMap, but not in ArcGIS Pro so the process might be slightly different.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 21:44:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170404#M64476</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2022-05-03T21:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170638#M64486</link>
      <description>&lt;P&gt;Not sure in Pro as I have not looked into Add Ins for Pro, but in ArcMap, getting the map click point was fairly simple using an Add In.&lt;/P&gt;&lt;P&gt;Good example &lt;A href="https://ianbroad.com/google-street-view-python-addin-for-arcmap/" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 15:11:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170638#M64486</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-05-04T15:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170639#M64487</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; Will take a look at the samples.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 14:57:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170639#M64487</guid>
      <dc:creator>YinghongLi1</dc:creator>
      <dc:date>2022-05-04T14:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170640#M64488</link>
      <description>&lt;P&gt;i got a message saying "can't be downloaded securely".&amp;nbsp; Please help.&amp;nbsp; Thanks...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 15:01:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170640#M64488</guid>
      <dc:creator>YinghongLi1</dc:creator>
      <dc:date>2022-05-04T15:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170648#M64492</link>
      <description>&lt;P&gt;Looks like that page hasn't been updated to https yet.&lt;/P&gt;&lt;P&gt;Here is the download &lt;A href="https://ianbroad.com/download/file/StreetViewAddin-104.zip" target="_self"&gt;link&lt;/A&gt; in https.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 15:13:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170648#M64492</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-05-04T15:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170656#M64493</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; I got the downloads.&lt;/P&gt;&lt;P&gt;It is an addin file so i can't check the source file.&amp;nbsp; I need some Python code to guide my tool creation.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 15:23:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170656#M64493</guid>
      <dc:creator>YinghongLi1</dc:creator>
      <dc:date>2022-05-04T15:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170658#M64494</link>
      <description>&lt;P&gt;Old ESRI add in's are just renamed zip files.&lt;/P&gt;&lt;P&gt;rename it with a .zip extension and you can get access to the files within.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 15:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170658#M64494</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-05-04T15:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis Pro 2.9 ArcPy Get Selected Feature</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170674#M64496</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; I got it.&amp;nbsp; I am going to take a look at it.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 16:06:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-pro-2-9-arcpy-get-selected-feature/m-p/1170674#M64496</guid>
      <dc:creator>YinghongLi1</dc:creator>
      <dc:date>2022-05-04T16:06:26Z</dc:date>
    </item>
  </channel>
</rss>

