This code finds all unique IDs in a feature class, and sticks them into a new table.import arcpy
input = "H:/GIS_Data/TEMP_GDB.gdb/feattoline" # feature class to iterate
gdb = "H:/GIS_Data/TEMP_GDB.gdb" #gdb or folder for your new table
table = "JunkTable"
tabpath = gdb + "/" + table
arcpy.CreateTable_management(gdb,table)
arcpy.AddField_management(tabpath,"ID","TEXT")
rows = arcpy.SearchCursor(input)
ids = []
for row in rows:
if row.FID_polyfc not in ids:
ids.append(row.FID_polyfc)
insrows = arcpy.InsertCursor(tabpath)
for id in ids:
insrow = insrows.newRow()
insrow.ID = id
insrows.insertRow(insrow)
del row
del rows
del insrow
del insrows
PS - this is largely a community forum (ie. users answer questions on their own time), so don't be bitter if your question goes unanswered. Especially if it's not in the correct forum - this should be in 'Geoprocessing'.