gp.AddField_management(myPolylineFC, "END_X", "DOUBLE") gp.AddField_management(myPolylineFC, "END_Y", "DOUBLE") shapeFieldName = gp.describe(myPolylineFC).shapefieldname updateRows = gp.updatecursor(myPolylineFC) updateRow = updateRow.next() while updateRow: updateRow.END_X = updateRow.getvalue(shapeFieldName).lastpoint.x #start node is ".firstpoint" updateRow.END_X = updateRow.getvalue(shapeFieldName).lastpoint.y updateRows.updaterow(updateRow) updateRow = updateRows.next() del updateRow del updateRows
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.