sorted(arcpy.da.SearchCursor(table, 'atribute'))
with arcpy.da.Editor(workspace) as edit: arcpy.Sort_management (in_dataset, out_dataset, sort_field)
arcpy.gp.UpdateCursor (stream_in,"","","", "LINKNO D") count1 = arcpy.gp.GetCount_management(stream_in) cursor = arcpy.SearchCursor(stream_in) row = cursor.next() fid = row.FID print "naming fid" print fid
The LINKNO attribute counts up to 449 and it is the line with 449 as the attribute that I want the script to read first. When I call the fid it still reads as fid 0, not 115 as I was shooting for. arcpy.gp.UpdateCursor (stream_in,"","","", "LINKNO D") count1 = arcpy.gp.GetCount_management(stream_in) cursor = arcpy.SearchCursor(stream_in) row = cursor.next() fid = row.FID print "naming fid" print fid
maxValue = arcpy.gp.SearchCursor(stream_in,"","","", "LINKNO D").next().getValue(FID)
uCursor = arcpy.gp.UpdateCursor (stream_in,"","","", "LINKNO D") urow = uCursor.next() fidStart = urow.FID print "fid start" print fidStart
for row in uCursor: print row.FID
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und vieles mehr. Neu hier? Erstelle ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.