Rng = [] for row in arcpy.SearchCursor("X:\JasonGraham\Landstatus\Data\ls2014.gdb\BaseData\Townships"): Rng.append(row.RNG_NUMC) class ComboBoxClass7(object): #Collect Range from list of unique values gathered from the layer """Implementation for MTR_addin.combobox_3 (ComboBox)""" def __init__(self): self.value = "000" self.items = (Rng) self.editable = True self.enabled = True self.dropdownWidth = 'WWWW' self.width = 'WWWW' def onSelChange(self, selection): self.sel = selection def onEditChange(self, text): pass def onFocus(self, focused):#show only unique values if focused: values = (Rng) uniqueValues = set(values) self.items = [] for uniqueValue in uniqueValues: self.items.append(uniqueValue)
Solved! Go to Solution.