def button3Click(self, selection): index = self.listbox.curselection() label = self.listbox.get(index) # Local variables: layer = label # describe the feature layer to access the the selected set desc = arcpy.Describe(layer) # FIDSet will contain the selected features selectedFids = desc.FIDSet # If there are selectedFids (a selection set), write them to a new feature # class in the current workspace. if len(selectedFids) > 0:
queryList = selectedFids.replace(';', ',')
Solved! Go to Solution.
arcpy.SelectLayerByAttribute_management(layer, "SWITCH_SELECTION")
arcpy.SelectLayerByAttribute_management(layer, "SWITCH_SELECTION")