dataType = listOfTypes dataField = listOfFields dataDate = listOfDates dataList = listOfChoices theType = 'none' theField = 'none' theDate = 'none' theChoice = 'none'
class ComboBoxClass_DataType(object): """Select the data TYPE """ def __init__(self): global dataType self.items = dataType self.editable = True self.enabled = True self.dropdownWidth = '%s' % ('W' * 12) self.width = '%s' % ('W' * 12) def onSelChange(self, selection): global theType theType = selection
class ButtonClass_LoadData(object): """Implementation for DataBrowser_LoadData.button (Button) LOADS the data into the current mxd """ def __init__(self): self.enabled = True self.checked = False def onClick(self): global theType global theField global theDate global theChoice result = LayerFinder.loadLayerToMxd(theType, theField, theDate, theChoice)
import arcpy import pythonaddins class OpenGPTool(object): """Implementation for Test_Addin_Button_addin.button (Button)""" def __init__(self): self.enabled = True self.checked = False def onClick(self): pythonaddins.GPToolDialog(r'path to ArcGIS Install\ArcGIS\Desktop10.1\ArcToolbox\Toolboxes\Analysis Tools.tbx', 'Intersect')
pythonaddins.GPToolDialog(r'path to ArcGIS Install\ArcGIS\Desktop10.1\ArcToolbox\Toolboxes\Analysis Tools.tbx\Overlay', 'Intersect'
pythonaddins.GPToolDialog(r'path to ArcGIS Install\ArcGIS\Desktop10.1\ArcToolbox\Toolboxes\Analysis Tools.tbx', 'Overlay\Intersect'
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.