<?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: wxPython hooked to arcmap? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454376#M35684</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We do hope to support wxPython in the future as the Python UI Framework for hooking into ArcGIS Desktop.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jason Pardy &lt;BR /&gt;Esri&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alright!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Nov 2011 15:10:12 GMT</pubDate>
    <dc:creator>TedCronin</dc:creator>
    <dc:date>2011-11-09T15:10:12Z</dc:date>
    <item>
      <title>wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454374#M35682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Any of you genius mind know how to hook a wxPython GUI back up to arcmap?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2011 19:32:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454374#M35682</guid>
      <dc:creator>KevinBell</dc:creator>
      <dc:date>2011-10-17T19:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454375#M35683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately, this currenly does not work and is not supported. The low-levels of integrating any Python UI framework (including wxPython) with the event loop of the desktop applications is very difficult. It is something we are researching to fix, but the scope of such a project is very big and isn't something that we feel can be done in the 10.1 timeframe. We do hope to support wxPython in the future as the Python UI Framework for hooking into ArcGIS Desktop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jason Pardy &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Esri&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2011 21:43:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454375#M35683</guid>
      <dc:creator>JasonPardy</dc:creator>
      <dc:date>2011-10-17T21:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454376#M35684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We do hope to support wxPython in the future as the Python UI Framework for hooking into ArcGIS Desktop.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jason Pardy &lt;BR /&gt;Esri&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alright!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 15:10:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454376#M35684</guid>
      <dc:creator>TedCronin</dc:creator>
      <dc:date>2011-11-09T15:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454377#M35685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I notice that threading.Timer, or indeed any implementation of threading, doesn't work in ArcMap Python.&amp;nbsp; I'm assuming this is a related issue?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 18:28:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454377#M35685</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2011-11-14T18:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454378#M35686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can get wxPython to work in an add-in, EXCEPT that Destroy() doesn't work.&amp;nbsp; For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import arcpy
import pythonaddins
import wx

class TestButtonClass(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for wxTest_addin.TestButton (Button)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; dlg = None
&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; if self.dlg is None:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.dlg = TestDialog()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.dlg.Show(True)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return

class TestDialog(wx.Frame):
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wxStyle = wx.CAPTION | wx.RESIZE_BORDER | wx.MINIMIZE_BOX |wx.CLOSE_BOX | wx.SYSTEM_MENU
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wx.Frame.__init__(self, None, -1, "Set DataFrame Name", style=wxStyle, size=(300, 120))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.SetMaxSize((300, 120))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.SetMinSize((300, 120))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.Bind(wx.EVT_CLOSE, self.OnClose)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; panel = wx.Panel(self, -1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.lblStatus = wx.StaticText(panel, -1, "OK", pos=(8, 8))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wx.StaticText(panel, -1, "Title:", pos=(8,36))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.tbTitle = wx.TextCtrl(panel, -1, value="", pos=(36, 36), size=(200,21))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.btnSet = wx.Button(panel, label="Set", pos=(8, 66))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.Bind(wx.EVT_BUTTON, self.OnSet, id=self.btnSet.GetId())
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.Show(True)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; def OnClose(self, event):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.Show(False) # self.Destroy() doesn't work

&amp;nbsp;&amp;nbsp;&amp;nbsp; def OnSet(self, event):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Use str() to strip away Unicode crap
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sTitle = str(self.tbTitle.GetValue())
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument("CURRENT")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df = mxd.activeDataFrame
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.name = sTitle
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RefreshTOC()

app = wx.PySimpleApp()
app.MainLoop()
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't yet investigated the consequences of having more than one add-in using wxPython.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:16:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454378#M35686</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2021-12-11T20:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454379#M35687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Multiple add-ins, multiple dialogs, no problem.&amp;nbsp; Button, ComboBox, and RadioButton events work fine; I haven't tested any others.&amp;nbsp; One other quirk I noticed:&amp;nbsp; print, when executed from a dialog, does not output to the Python window.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 15:46:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454379#M35687</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2011-11-16T15:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454380#M35688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you Mark, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it works like a charm.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 18:37:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454380#M35688</guid>
      <dc:creator>ifgiEDC</dc:creator>
      <dc:date>2011-12-14T18:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454381#M35689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;We do hope to support wxPython in the future as the Python UI Framework for hooking into ArcGIS Desktop.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jason Pardy &lt;BR /&gt;Esri&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Alright!!!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I second that 'Alright!' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;_Nik&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 21:56:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454381#M35689</guid>
      <dc:creator>NikolasStevenson-Molnar</dc:creator>
      <dc:date>2012-01-17T21:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454382#M35690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using wxPython and problem lies in closing the main frame.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'self.Show(False)' isn't closing the main frame. Do you suggest any way to close main frame without crashing arcmap. Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 19:06:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454382#M35690</guid>
      <dc:creator>IbraheemKhan1</dc:creator>
      <dc:date>2013-04-26T19:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: wxPython hooked to arcmap?</title>
      <link>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454383#M35691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have written a Python script using wxPython that runs inside ArcMap.&amp;nbsp; It runs fine from the Python Command Line inside ArcMap, but if it is launched from an ArcMap Add-In, it runs once without a problem, but if it is run a second time in the same ArcMap session, it crashes ArcMap.&amp;nbsp; If it is launched from a Toolbar Tool, it crashes ArcMap immediately.&amp;nbsp; More details here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/message/769441-is-wxpython-incompatible-with-arcmap-add-ins-and-tools"&gt;https://community.esri.com/message/769441-is-wxpython-incompatible-with-arcmap-add-ins-and-tools&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 18:35:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/wxpython-hooked-to-arcmap/m-p/454383#M35691</guid>
      <dc:creator>JohnMorgan1</dc:creator>
      <dc:date>2018-05-09T18:35:04Z</dc:date>
    </item>
  </channel>
</rss>

