There's probably a one-liner function out there that tells you the last number in a list of numbers, but this works:import arcpy input = "H:/GIS_Data/TEMP_GDB.gdb/feattoline" # your feature class field = "OBJECTID A" # the name of the field, sorted ascending rows = arcpy.SearchCursor(input,"","","",field) for row in rows: number = row.OBJECTID This code simply sorts the values in the field "OBJECTID," assigns and overwrites that value to the variable "number" for each increasing value. Finally, you're left with the largest value of "OBJECTID." Then, make pStart = number.
import arcpy input = "H:/GIS_Data/TEMP_GDB.gdb/feattoline" # your feature class field = "OBJECTID A" # the name of the field, sorted ascending rows = arcpy.SearchCursor(input,"","","",field) for row in rows: number = row.OBJECTID
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.