Select to view content in your preferred language

Calculate Geometry on AGOL Hosted Feature Layer?

317
0
02-13-2019 10:23 AM
by Anonymous User
Not applicable

Is this possible to run on a hosted features layer? I'm running into errors when executing my script. I have an ArcPro project saved with my imported layer from AGOL.

import arcpy
from arcgis import GIS

prjPath = r"C:\Python\XY_test\MyProject5\MyProject5.aprx"

proj = arcpy.mp.ArcGISProject(prjPath)
map = proj.listMaps()[0]
layer = map.listLayers()[0]

arcpy.CalculateGeometryAttributes_management(layer, ["Northing", "POINT_Y"])

print ('Northing Update Complete')‍‍‍‍‍‍‍‍‍‍‍‍

0 Kudos
0 Replies