myField = "MY_FIELD" minValue = arcpy.SearchCursor(inlayer, "", "", "", myField + " A").next().getValue(myField) #Get 1st row in ascending cursor sort maxValue = arcpy.SearchCursor(inlayer, "", "", "", myField + " D").next().getValue(myField) #Get 1st row in descending cursor sort
theitems = [] rows = arcpy.SearchCursor(inlayer) for row in rows: theitems.append(row.getValue(somefieldname)) del rows theitems.sort() min = theitems[0] max = theitems[-1]
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.