<?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: Attach a Python script to a button? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253366#M8686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Geoprocessing tools with no arguments will be immediately executed (no GP dialog) from toolbar buttons. So if you 1. create a toolbox with a single script tool (no parameters) that points to your .py and 2. customize a toolbar and add a script tool, you should essentially get what you're looking for.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Dec 2010 21:15:06 GMT</pubDate>
    <dc:creator>JasonScheirer</dc:creator>
    <dc:date>2010-12-02T21:15:06Z</dc:date>
    <item>
      <title>Attach a Python script to a button?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253363#M8683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you attach a python script to a button?&amp;nbsp; Instead of adding it as a script tool?&amp;nbsp; Can you create a whole toolbar of python scripts?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 18:23:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253363#M8683</guid>
      <dc:creator>MikeDriver</dc:creator>
      <dc:date>2010-12-02T18:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a Python script to a button?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253364#M8684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been unable to find a way to do this without using VBA or .NET.&amp;nbsp; Of course, VBA is deprecated in ArcGIS 10, so you shouldn't base development on it.&amp;nbsp; And if you are going to write code in .NET, then you might as well incorporate whatever it is that the Python scripting is doing into the .NET code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If there is a way to directly launch a Python script from an ArcMap interface button without first turning that script into a Script Tool in a toolbox, then I would also like to know how to do it, but I have combed through the help docs and been unable to discover a way to do this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 20:46:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253364#M8684</guid>
      <dc:creator>JoeVondracek</dc:creator>
      <dc:date>2010-12-02T20:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a Python script to a button?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253365#M8685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;what is the aversion to using tools in ArcToolbox?&amp;nbsp; they add the extra dimension of being used in models etc and the toolboxes and scripts are easily distributed...the only difference is clicking a button versus clicking a tool in terms of the interface&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 21:14:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253365#M8685</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2010-12-02T21:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a Python script to a button?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253366#M8686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Geoprocessing tools with no arguments will be immediately executed (no GP dialog) from toolbar buttons. So if you 1. create a toolbox with a single script tool (no parameters) that points to your .py and 2. customize a toolbar and add a script tool, you should essentially get what you're looking for.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Dec 2010 21:15:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253366#M8686</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2010-12-02T21:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a Python script to a button?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253367#M8687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's not a big deal to turn the Python script into a Script Tool, add it to a Toolbox, and then reference it in an ArcMap interface customization from the Toolbox.&amp;nbsp; However, we have moved from a paradigm where you could have a VBA customization embedded within the MXD project file to one where, in order to do the exact same thing, you need to have at least two additional files: the Python script and the Toolbox.&amp;nbsp; That changes deployment, and it adds the additional step of creating the Toolbox Script Tool.&amp;nbsp; Having the tools in a Toolbox means that users can possibly run them outside of the environment that we want them to run them in... unless we spend additional time creating the tools to prevent that, which we wouldn't have to do if they were embedded directly into the MXD project.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For us, this is mainly a transitional problem in going from an ArcGIS 9.x environment with embedded VBA code in a special MXD project to a world where users (with limited ArcGIS skills) are split between versions 9.x and 10, and you can't quite do things in the same manner between those two versions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Dec 2010 18:47:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253367#M8687</guid>
      <dc:creator>JoeVondracek</dc:creator>
      <dc:date>2010-12-03T18:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a Python script to a button?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253368#M8688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To all ESRI personnel reading this, I would like to voice that I also find this very annoying.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 20:44:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253368#M8688</guid>
      <dc:creator>SeanCook</dc:creator>
      <dc:date>2011-01-19T20:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Attach a Python script to a button?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253369#M8689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you aware that you can embed your python scirpts in the toolbox? See &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Embedding_scripts_and_password_protecting_tools/005700000017000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Embedding_scripts_and_password_protecting_tools/005700000017000000/&lt;/A&gt;&lt;SPAN&gt; for details.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jan 2011 06:30:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/attach-a-python-script-to-a-button/m-p/253369#M8689</guid>
      <dc:creator>NiklasNorrthon</dc:creator>
      <dc:date>2011-01-20T06:30:23Z</dc:date>
    </item>
  </channel>
</rss>

