<?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 Select by Location with user input in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/select-by-location-with-user-input/m-p/647512#M50412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey everybody,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been fighting with this for a while. I was looking to create a button that starts a select by location script with the highlighted parts of select by attribute being configured by the user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In example: The user clicks on the button and a popup box appears asking the user to select the layers he would like as target features (in_layer). These features are all found in the table of contents. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After selecting the layers another box pops up directing him to select the "select feature" layer (which there is a choice of 5 specific layers). These features are not in the table of content but in a geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SelectLayerByLocation_management (in_layer, {overlap_type}, {select_features}, {search_distance}, {selection_type})&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Apr 2013 14:51:37 GMT</pubDate>
    <dc:creator>TimWitt</dc:creator>
    <dc:date>2013-04-09T14:51:37Z</dc:date>
    <item>
      <title>Select by Location with user input</title>
      <link>https://community.esri.com/t5/python-questions/select-by-location-with-user-input/m-p/647512#M50412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey everybody,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been fighting with this for a while. I was looking to create a button that starts a select by location script with the highlighted parts of select by attribute being configured by the user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In example: The user clicks on the button and a popup box appears asking the user to select the layers he would like as target features (in_layer). These features are all found in the table of contents. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After selecting the layers another box pops up directing him to select the "select feature" layer (which there is a choice of 5 specific layers). These features are not in the table of content but in a geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SelectLayerByLocation_management (in_layer, {overlap_type}, {select_features}, {search_distance}, {selection_type})&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 14:51:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-by-location-with-user-input/m-p/647512#M50412</guid>
      <dc:creator>TimWitt</dc:creator>
      <dc:date>2013-04-09T14:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Select by Location with user input</title>
      <link>https://community.esri.com/t5/python-questions/select-by-location-with-user-input/m-p/647513#M50413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For now I only know how to do it if I specify the parameters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; import arcpy
import pythonaddins

class StormSurge1(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for StormSurge_addin.btn1 (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = ('current')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByLocation_management ("Fire Station", "INTERSECT", r"Storm Surge\cat3_full")

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:28:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-by-location-with-user-input/m-p/647513#M50413</guid>
      <dc:creator>TimWitt</dc:creator>
      <dc:date>2021-12-12T03:28:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select by Location with user input</title>
      <link>https://community.esri.com/t5/python-questions/select-by-location-with-user-input/m-p/647514#M50414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try calling a script tool using &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

pythonaddins.GPToolDialog(PathtoToolbox, 'nameofscriptool')

&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That way you can prompt for use input&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-by-location-with-user-input/m-p/647514#M50414</guid>
      <dc:creator>JonPedder</dc:creator>
      <dc:date>2021-12-12T03:28:12Z</dc:date>
    </item>
  </channel>
</rss>

