1

I think you are correct regarding the script only changing the UI. This is because the dlg attribute of your ToolClass2 is always pointing to the same instance of the TestDialog UI class. When you first run the tool, the TestDialog instance is created and your Add-in works as intended. Next time, since self.dlg is not None, your else clause just shows the ...


1

As per my comment, why not just use a combobox for the layer list within the AddIn itself? Here is an example of how I have done this before in a Python AddIn: class LayerList(object): """Implementation for ClipAndShip_addin.combobox (ComboBox)""" def __init__(self): self.items = [] self.editable = True self.enabled = True ...


1

No, you cannot. A GP Tool dialog is not an embeddable wx control.


1

I found a technique to do this described at Another GIS Blog under the title of Python Add-Ins and Tkinter: ArcGIS for Desktop does not support any python GUIs out of the box, but let's say we want to have a form pop-up anyway. ... One way to do this is to create a wx python instance at start up, which is create before the desktop python loop is ...


1

See the answer on the Esri forums. Set arcpy.env.addOutputsToMap to False at the beginning, then back to True when you're done.


Only top voted, non community-wiki answers of a minimum length are eligible