<?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 arcpy to open Script tool in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-arcpy-to-open-script-tool/m-p/298293#M23078</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Tim,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This was exactly it. Simply needed to take out the spaces...ugh. Thanks for the help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Dec 2013 13:30:25 GMT</pubDate>
    <dc:creator>JensenConnor</dc:creator>
    <dc:date>2013-12-09T13:30:25Z</dc:date>
    <item>
      <title>Using arcpy to open Script tool</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-open-script-tool/m-p/298290#M23075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible to use the pythonaddins.GPToolDialog(X,Y) as part of my python addins toolbar script to open a script tool I have stored in a custom toolbox? Where X is a string representing the location of my toolbox and Y is the name of my script tool. I can use this to open geoprocessing tools but have not been able to figure out how to open my script in the toolbox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any ideas you may have.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Dec 2013 18:33:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-open-script-tool/m-p/298290#M23075</guid>
      <dc:creator>JensenConnor</dc:creator>
      <dc:date>2013-12-06T18:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using arcpy to open Script tool</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-open-script-tool/m-p/298291#M23076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If the script tool in question is also a python script you can view its source by looking at the properties context menu of the script tool in arccatalog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If that is the case, you can explicitly import the script file to your python script by saving a copy of the script in either your python path directory or just right next to (that is, in the same folder) the script you are importing it to like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import customPyScript&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if the name of the script file you are looking for is customPyScript.py&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;after you import your script you should be able to access its methods by calling it thusly:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;customPyScipt.method(input, output)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are importing a binary tool from an existing toolbox you should be able to do:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.ImportToolbox(tbxPath, scriptName)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I might have misunderstood your question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What do you mean by "open [your] script in the toolbox"?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-open-script-tool/m-p/298291#M23076</guid>
      <dc:creator>MaxSquires</dc:creator>
      <dc:date>2021-12-11T14:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using arcpy to open Script tool</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-open-script-tool/m-p/298292#M23077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is it possible to use the pythonaddins.GPToolDialog(X,Y) as part of my python addins toolbar script to open a script tool I have stored in a custom toolbox? Where X is a string representing the location of my toolbox and Y is the name of my script tool. I can use this to open geoprocessing tools but have not been able to figure out how to open my script in the toolbox.&lt;BR /&gt;&lt;BR /&gt;Thanks for any ideas you may have.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Your script is a 'tool' after you import it/add it into a toolbox so works the same as any other tool- pythonaddins.GPToolDialog() just references the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;name&lt;/SPAN&gt;&lt;SPAN&gt; (Y) of the tool within the toolbox (X). Remember that the tool will display using its 'Label' within the toolbox, but you need to reference the 'Name' so right click on the tool/script that you want to use and inspect the 'Name' value in the 'General' tab. I think you may be trying to use the 'label' which is tripping you up?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 08 Dec 2013 19:18:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-open-script-tool/m-p/298292#M23077</guid>
      <dc:creator>TimBarnes</dc:creator>
      <dc:date>2013-12-08T19:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using arcpy to open Script tool</title>
      <link>https://community.esri.com/t5/python-questions/using-arcpy-to-open-script-tool/m-p/298293#M23078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Tim,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This was exactly it. Simply needed to take out the spaces...ugh. Thanks for the help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 13:30:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-arcpy-to-open-script-tool/m-p/298293#M23078</guid>
      <dc:creator>JensenConnor</dc:creator>
      <dc:date>2013-12-09T13:30:25Z</dc:date>
    </item>
  </channel>
</rss>

