funct_value = 99999 query = '"FUNC" = ' + str(funct_value) print query
funct_value = 99999 query = "\"FUNC\" = '%s'" % (func_value) print query
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
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.