<?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: There is any possible to open a script in a Toolset by GPToolDialog()? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/there-is-any-possible-to-open-a-script-in-a/m-p/707894#M54854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Vinicius,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;I created a tool box here:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;D:\Toolbox&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;I created a tool set named "Tools" and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;I added a simple script to the toolbox and named it "test2."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/364079_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Here is the syntax that opens that script in a GP dialog:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; pythonaddins

pythonaddins&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GPToolDialog&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'D:\Toolbox.tbx'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'test2'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;~Alex&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 05:44:03 GMT</pubDate>
    <dc:creator>AlexanderBrown5</dc:creator>
    <dc:date>2021-12-12T05:44:03Z</dc:date>
    <item>
      <title>There is any possible to open a script in a Toolset by GPToolDialog()?</title>
      <link>https://community.esri.com/t5/python-questions/there-is-any-possible-to-open-a-script-in-a/m-p/707893#M54853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I need to open a Python Script using GPToolDialog(), but the script is in a Toolset, not in the Toolbox main path.&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;I tried many ways to solve but do not work, examples:&lt;/P&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;Example 1:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="language-python" style="color: #393318; background-color: #eff0f1; border: 0px; font-size: 13px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;CODE&gt;pythonaddins&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GPToolDialog&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'Path to Toolbox\Toolset'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Script'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;Example 2:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="language-python" style="color: #393318; background-color: #eff0f1; border: 0px; font-size: 13px; margin: 0px 0px 1em; padding: 5px;"&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;pythonaddins&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GPToolDialog&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'Path to Toolbox'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Toolset\Script'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P style="color: #242729; background-color: rgba(248, 248, 248, 0.6); border: 0px; margin: 0px 0px 1em;"&gt;No one ot the examples works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2017 14:04:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/there-is-any-possible-to-open-a-script-in-a/m-p/707893#M54853</guid>
      <dc:creator>ViniciusCruvinel_Rego</dc:creator>
      <dc:date>2017-07-24T14:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: There is any possible to open a script in a Toolset by GPToolDialog()?</title>
      <link>https://community.esri.com/t5/python-questions/there-is-any-possible-to-open-a-script-in-a/m-p/707894#M54854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Vinicius,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;I created a tool box here:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;D:\Toolbox&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;I created a tool set named "Tools" and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;I added a simple script to the toolbox and named it "test2."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/364079_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Here is the syntax that opens that script in a GP dialog:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; pythonaddins

pythonaddins&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GPToolDialog&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'D:\Toolbox.tbx'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'test2'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;~Alex&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:44:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/there-is-any-possible-to-open-a-script-in-a/m-p/707894#M54854</guid>
      <dc:creator>AlexanderBrown5</dc:creator>
      <dc:date>2021-12-12T05:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: There is any possible to open a script in a Toolset by GPToolDialog()?</title>
      <link>https://community.esri.com/t5/python-questions/there-is-any-possible-to-open-a-script-in-a/m-p/707895#M54855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alexander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that I created a Toolset into a Toolbox. I realize that &amp;nbsp;&lt;CODE&gt;GPToolDialog() calls the script name, even the .py are in or out any Toolset. If my new tool box goes to&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;CODE&gt;Toolbox &amp;gt; Toolset &amp;gt; .py (script)&lt;/CODE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use your code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; pythonaddins

pythonaddins&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GPToolDialog&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'D:\Toolbox.tbx'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'.py (script, just the name)'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This code will call the Script name in the Toolbox, independent the location in any toolset. The name is the key.&lt;/P&gt;&lt;P&gt;Many thanks for the help!&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:44:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/there-is-any-possible-to-open-a-script-in-a/m-p/707895#M54855</guid>
      <dc:creator>ViniciusCruvinel_Rego</dc:creator>
      <dc:date>2021-12-12T05:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: There is any possible to open a script in a Toolset by GPToolDialog()?</title>
      <link>https://community.esri.com/t5/python-questions/there-is-any-possible-to-open-a-script-in-a/m-p/707896#M54856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Converted the discussion to a question so you can mark an answer as correct when resolved.&amp;nbsp; This helps others located the answer faster.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2017 14:48:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/there-is-any-possible-to-open-a-script-in-a/m-p/707896#M54856</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2017-07-24T14:48:59Z</dc:date>
    </item>
  </channel>
</rss>

