<?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: Python Add-In: Getting User Input in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183890#M14136</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again, if ok to have at the initial click of the toolbutton (and not interactive...in which case looks more at Micah's response), you can do most of this with the initial GUI.&amp;nbsp; For an exmaple, the Server Admin Toolkit&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340" title="http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340"&gt;http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uses Parameters and the Validate tabs (right click on the tool to modify).&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/277485_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The gui for stopping and starting services looks like&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/277490_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tool looks for "Server Name", "Port", "Admin User" and "Admin Password" to be entered, then checks that they are valid....then it populates the "Service List" (filters based on the "Stop, Start, Delete" field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if you are setting the parameters at the beginning of running the tool, you have options with the build in features. I would start with a sample like the one above to figure out how to get it to check and populate another box based on input.&amp;nbsp; There are also probably samples in the help for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Dec 2016 22:34:05 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2016-12-06T22:34:05Z</dc:date>
    <item>
      <title>Python Add-In: Getting User Input</title>
      <link>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183886#M14132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I have been searching and searching and have not been able to find a definitive answer. Is there any way to have a user provide input to a python add-in.&amp;nbsp; I have a process that runs via a model which uses 2 model parameters (one via a textbox, one via a combobox). I am trying to see if the same process can be done a python add-in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 19:46:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183886#M14132</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2016-12-06T19:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Python Add-In: Getting User Input</title>
      <link>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183887#M14133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does you python add-in use a toolbox/toolbuttons?&amp;nbsp; Are you using the built in ability with toolbuttons to as for parameters/user-input?&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" height="151" src="https://community.esri.com/legacyfs/online/277428_pastedImage_1.png" width="514" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is, can the input be done at the start of the program, or are you looking for input &lt;EM&gt;while&lt;/EM&gt; the tool is running, --- more of an interactive input (that I can't help with).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 20:30:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183887#M14133</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-12-06T20:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python Add-In: Getting User Input</title>
      <link>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183888#M14134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rebecca,&lt;/P&gt;&lt;P&gt;The input would be gathered at the start of the program. I have not started working on this yet, just trying to figure out if it's doable.&lt;/P&gt;&lt;P&gt;What I'm looking for is to be able to have something like this appear after selecting the menuitem off of the toolbar where the user would enter the address into the one field and select a LuCode from the dropdown:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/277449_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Then click "Ok" and the code would run. My hunch is that it's not doable, just hope I'm wrong on that.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 21:37:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183888#M14134</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2016-12-06T21:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Python Add-In: Getting User Input</title>
      <link>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183889#M14135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the function you want is pythonaddins &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/guide-books/python-addins/the-pythonaddins-module.htm"&gt;GPToolDialog(toolbox, tool_name)&lt;/A&gt;. If you hook that up to a button click event, it will bring up your model's user input form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beyond that, you would need to either go the .NET route or leverage a Python-based GUI package like PyQt, tkinter, &amp;nbsp;or PySide. This is probably overkill for what you're talking about, but if you are interested there's a nice &lt;A href="http://videostg.esri.com/watch/4549/developing-custom-tools-with-pyqt"&gt;video from an Esri UC&lt;/A&gt; on the topic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps! I find pythonaddins to be a lot of fun to work with personally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Micah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 22:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183889#M14135</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2016-12-06T22:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python Add-In: Getting User Input</title>
      <link>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183890#M14136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again, if ok to have at the initial click of the toolbutton (and not interactive...in which case looks more at Micah's response), you can do most of this with the initial GUI.&amp;nbsp; For an exmaple, the Server Admin Toolkit&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340" title="http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340"&gt;http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uses Parameters and the Validate tabs (right click on the tool to modify).&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/277485_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The gui for stopping and starting services looks like&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/277490_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The tool looks for "Server Name", "Port", "Admin User" and "Admin Password" to be entered, then checks that they are valid....then it populates the "Service List" (filters based on the "Stop, Start, Delete" field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if you are setting the parameters at the beginning of running the tool, you have options with the build in features. I would start with a sample like the one above to figure out how to get it to check and populate another box based on input.&amp;nbsp; There are also probably samples in the help for this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 22:34:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183890#M14136</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-12-06T22:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Python Add-In: Getting User Input</title>
      <link>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183891#M14137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Micah and Rebecca. I will explore the information both of you have provided to me. Very much appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 23:28:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-add-in-getting-user-input/m-p/183891#M14137</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2016-12-06T23:28:48Z</dc:date>
    </item>
  </channel>
</rss>

