import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" list = [] rows = arcpy.SearchCursor("Table") for row in rows: Class = row.getValue("Class") list.append(Class) del row, rows #remove duplicates from list list = dict.fromkeys(list) list = list.keys() for n in list: rec = 0 rows = arcpy.UpdateCursor("Table") for row in rows: if row.Class == n: pInterval = 1 if (rec == 0): rec = 1 row.SeqNumber = rec else: rec = rec + pInterval row.SeqNumber = rec rows.updateRow(row) del row, rows
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.