<?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: Why don't Python add-ins provide a dialog box for user input? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623507#M48605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, your right. I looked at it a while ago and just copied the link.&amp;nbsp; I'll edit my post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 May 2015 03:18:31 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2015-05-05T03:18:31Z</dc:date>
    <item>
      <title>Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623498#M48596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently, we &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/The_pythonaddins_module/014p00000021000000/"&gt;have&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OpenDialog&lt;/P&gt;&lt;P&gt;SaveDialog&lt;/P&gt;&lt;P&gt;GPToolDialog&lt;/P&gt;&lt;P&gt;MessageBox&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there's no way to actually get user input. Why is this? Does ESRI plan on eventually providing a way to get user input?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 17:53:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623498#M48596</guid>
      <dc:creator>IanBroad</dc:creator>
      <dc:date>2015-05-04T17:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623499#M48597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the input requirements?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One solution is to create a new tool in a Toolbox.tbx and setup input parameters.&amp;nbsp; Then you can open/popup this as a UI with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;pythonaddins.GPToolDialog(r'&amp;lt;path&amp;gt;\&amp;lt;toolboxname.tbx&amp;gt;', '&amp;lt;tool name&amp;gt;')&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's how it might look hooked into an add-in with a button tool:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;class ButtonClass_CreateSHP(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for my_addin.button_1 (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.checked = False
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onClick(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pythonaddins.GPToolDialog(r'&amp;lt;path&amp;gt;\&amp;lt;toolboxname.tbx&amp;gt;', 'CreateShapefile')&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:34:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623499#M48597</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-12T02:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623500#M48598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have it in a Toolbox?&amp;nbsp; It's easy to create a Python addin from a tools box that will have a user interface.&amp;nbsp; For what it's worth, I have some steps listed in a power point &lt;A href="https://community.esri.com/thread/78204"&gt;Python add-ins vs. .NET add-ins?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;And there is a tech session &lt;A href="https://community.esri.com/docs/DOC-1812"&gt;Python Add-ins: Tips and Tricks&lt;/A&gt;&amp;nbsp;&amp;nbsp; that might be worth checking out.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 18:04:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623500#M48598</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-05-04T18:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623501#M48599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I've thought about that. I just see it as kind of a clunky, unattractive way of doing it. I'd be nice to just have a dialog box that the user could enter a value into- it seems simple enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One example is that I'd like to have a button that when clicked takes an OID of a specific layer for input, and zooms to that feature based on the OID entered. Easy enough to do, but the whole user input part is missing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 18:11:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623501#M48599</guid>
      <dc:creator>IanBroad</dc:creator>
      <dc:date>2015-05-04T18:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623502#M48600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can accomplish this with the Tool Validator and set the input parameter when you launch the tool:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14307639676391444 jive_text_macro" data-renderedposition="50_8_912_16" jivemacro_uid="_14307639676391444"&gt;&lt;P&gt;pythonaddins.GPToolDialog(r&lt;SPAN class="string"&gt;'&amp;lt;path&amp;gt;\&amp;lt;toolboxname.tbx&amp;gt;', '&amp;lt;tool name&amp;gt;', '&amp;lt;arg1&amp;gt;', '&amp;lt;arg2')&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 18:26:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623502#M48600</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2015-05-04T18:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623503#M48601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right. I guess my main point is that I'd like to have a way of getting user input without needing to use an existing toolbox.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 18:34:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623503#M48601</guid>
      <dc:creator>IanBroad</dc:creator>
      <dc:date>2015-05-04T18:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623504#M48602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tkinter maybe?&amp;nbsp; Not sure how well it behaves though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 18:40:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623504#M48602</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2015-05-04T18:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623505#M48603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out &lt;A href="http://video.esri.com/watch/1229/arcmap-and-python-closing-the-vba-gap" title="http://video.esri.com/watch/1229/arcmap-and-python-closing-the-vba-gap"&gt;ArcMap and Python: Closing the VBA Gap | Esri Video&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Using wxPython as described in this video works even if it isn't officially supported by esri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 21:32:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623505#M48603</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-05-04T21:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623506#M48604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca, Jason's presentation is still just a bunch of blank screens with titles..I suspect some iThingy problem.&amp;nbsp; There are still a bunch of posts on that thread...Do you have a link that can be read with all content?&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 00:59:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623506#M48604</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-05-05T00:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623507#M48605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, your right. I looked at it a while ago and just copied the link.&amp;nbsp; I'll edit my post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 03:18:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623507#M48605</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-05-05T03:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623508#M48606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ArcMap does not play nicely with any Python modules that have a non-ArcMap GUI.&amp;nbsp; I've tried Tkinter and others, before finding that it just randomly crashes ArcMap.&amp;nbsp; Subsequent Googling found that other people have concluded that non-ArcMap GUI's in Python add-ins clash with ArcMap and cause it to crash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2019 00:46:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623508#M48606</guid>
      <dc:creator>TI</dc:creator>
      <dc:date>2019-05-06T00:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why don't Python add-ins provide a dialog box for user input?</title>
      <link>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623509#M48607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But be cautious.&amp;nbsp; As per my other post about Tkinter, wxPython GUI's in Python add-ins can randomly cause ArcMap to crash.&amp;nbsp; A very simply GUI may not experience the problem, but I would not trust it.&amp;nbsp; My experience with wxPython and several other Python GUIs in a Python add-in all had the same problem (by my GUI was somewhat more complicated).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then found that other people had concluded that non-ArcMap GUIs in Python addins are incompatible with ArcMap and likely to cause it to crash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 May 2019 00:49:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/why-don-t-python-add-ins-provide-a-dialog-box-for/m-p/623509#M48607</guid>
      <dc:creator>TI</dc:creator>
      <dc:date>2019-05-06T00:49:13Z</dc:date>
    </item>
  </channel>
</rss>

