import arcpy #infc = arcpy.GetParameterAsText(0) inFeatures = "Database Connections\Con_GDBHuracanesHistoricos.sde\GDBCiclonesTropicales.SDE.Huracanes_Historicos\GDBCiclonesTropicales.SDE.Ciclones_Historicos" # Enter for loop for each feature # for row in arcpy.da.SearchCursor(inFeatures, ["ObjectID", "SHAPE@"]): # Print the current line ID if "ObjectID" == 50: print("Feature {0}:".format(row[0])) #print "ObjectID" #Set start point startpt = row[1].firstPoint #Set Start coordinates startx = startpt.X print startx starty = startpt.Y print starty #Set end point endpt = row[1].lastPoint #Set End coordinates endx = endpt.X print endx endy = endpt.Y print endy
Solved! Go to Solution.
if row[0] == 50: #check first column returned by cursor
if row[0] == 50: #check first column returned by cursor