func_list = [] # Creates an empty Python List srows = arcpy.SearchCursor(StreetLayer) # Create a search cursor on the function class feature class for srow in srows: # loop over the rows of the functional class layer if srow.FUNC not in func_list: func_list.append(srow.FUNC) # adds unique FUNC values to the list for func_value in func_list: query = '"FUNC" = ' + str(func_value) StreetLayer.definitionQuery = query
funct_value = 99999 query = '"FUNC" = ' + str(funct_value) print query
funct_value = 99999 query = "\"FUNC\" = '%s'" % (func_value) print query
Ingelogde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Maak gratis een account aan.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.