Solved! Go to Solution.
Thanks! This works and saved me a bunch of time!
All,
I encountered this same problem in ModelBuilder in ArcGIS Pro 3.0 today ten years later and FYI the workaround still appears to do the job.
Joe
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
Thanks for the assistance.. It turns out that I don't need to have a draw order field that starts at 0 every time for Tableau, it just needs to be sequential. So if I add a new field that mimics the FID field, it should do the trick.