You can set any number of variables / parameters.First, set a variable to hold each parameter at the head of the ~_addin.pyjust after your importsdataType = listOfTypes
dataField = listOfFields
dataDate = listOfDates
dataList = listOfChoices
theType = 'none'
theField = 'none'
theDate = 'none'
theChoice = 'none'
now declare each of the variables global inside each class where you want to set or use them.for example:
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
Then, in the class behind the 'go' button, access that variable and any others the user sets in other wigits
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)
Dynamically preloading the input lists is an enhancement......