<?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: Using Drawing Tools in Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724039#M56051</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't believe you can set the default tool for a script tool.&amp;nbsp; However, you can use a rectangle for the &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000027000000"&gt;shape property&lt;/A&gt; of a python add-in tool.&amp;nbsp; Developing a python add-in will be a little more complex, but it will accomplish the user experience you are looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Mar 2015 17:29:28 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2015-03-03T17:29:28Z</dc:date>
    <item>
      <title>Using Drawing Tools in Python</title>
      <link>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724034#M56046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to make a user friendly interface needing to capture an area of interest boundary to use in selecting layer records to be processed with Python.&amp;nbsp; I would like to imitate the interactive GUI capability of simply drawing a graphic rectangle on the map and use the "select by graphic" to select the layer records to process.&amp;nbsp; Is there a way to access these functions or is there a way to emulate this simple user interface in Python?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 16:32:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724034#M56046</guid>
      <dc:creator>DavidGranata</dc:creator>
      <dc:date>2015-03-03T16:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drawing Tools in Python</title>
      <link>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724035#M56047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at the python add-in example &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//014p0000001q000000"&gt;here&lt;/A&gt;.&amp;nbsp; You will just need to update the code slightly to perform a 'Select by Location'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 16:38:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724035#M56047</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-03-03T16:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drawing Tools in Python</title>
      <link>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724036#M56048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this only available with the Addin?&amp;nbsp; I am developing a Script tool specifically.&amp;nbsp; I am new to Python and have been working with ESRI Tech Support for assistance and was lead in the direction of developing a Script tool as being a bit less complicated to create.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 16:47:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724036#M56048</guid>
      <dc:creator>DavidGranata</dc:creator>
      <dc:date>2015-03-03T16:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drawing Tools in Python</title>
      <link>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724037#M56049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can do this by using the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

graphic = arcpy.GetParameterAsText(0)

arcpy.MakeFeatureLayer_management(graphic, "lyr")
arcpy.SelectLayerByLocation_management(arcpy.GetParameterAsText(1), "INTERSECT", "lyr")
arcpy.RefreshActiveView()&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will then want to add this script to a toolbox.&amp;nbsp; See the section 'Adding Script Tools' &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/managing-tools-and-toolboxes/adding-tools.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;.&amp;nbsp; After you add the script, right-click on the Script tool &amp;gt; Properties &amp;gt; Parameters tab.&amp;nbsp; You will want to set up two parameters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen1.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/67783_screen1.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the first parameter, select a polygon feature class for the 'Schema' in the Parameter Properties.&amp;nbsp; The tool should then be ready to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:58:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724037#M56049</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-12T06:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drawing Tools in Python</title>
      <link>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724038#M56050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for providing information and education.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the point where I currently am at with my Script tool.&amp;nbsp; You have to define the schema to use which is the polygon editing.&amp;nbsp; The user interaction at this point is a polygon editing tool.&amp;nbsp; If you use the "rectangle" default the user interface is to make 3 clicks, not like the simple graphic rectangle draw click and drag a rectangle - very user friendly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the meat of my inquiry.&amp;nbsp; A user needs a little education on how to "digitize" a rectangle.&amp;nbsp; The graphic rectangle is so intuitive and user friendly needing no education.&amp;nbsp; I would like to improve the user experience to make it as simple as the interactive graphic draw capability (if it were open to Python to use).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 17:17:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724038#M56050</guid>
      <dc:creator>DavidGranata</dc:creator>
      <dc:date>2015-03-03T17:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drawing Tools in Python</title>
      <link>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724039#M56051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't believe you can set the default tool for a script tool.&amp;nbsp; However, you can use a rectangle for the &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//014p00000027000000"&gt;shape property&lt;/A&gt; of a python add-in tool.&amp;nbsp; Developing a python add-in will be a little more complex, but it will accomplish the user experience you are looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 17:29:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724039#M56051</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-03-03T17:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using Drawing Tools in Python</title>
      <link>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724040#M56052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be so much easier if Python had access to the "Graphic Draw tools" and the "Select by Graphic" in the interactive user interface.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 17:39:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-drawing-tools-in-python/m-p/724040#M56052</guid>
      <dc:creator>DavidGranata</dc:creator>
      <dc:date>2015-03-03T17:39:40Z</dc:date>
    </item>
  </channel>
</rss>

