Using Arcade:
Is there a way to update the geometry of an existing feature after an edit is made?
It would be the equivalent of a DB trigger, but using logic similar to the Python field calculator script below:
#written for ArcMap (https://gis.stackexchange.com/q/423806/62572)
def new_shape(geom): spatial_reference = geom.spatialReference geom = geom.densify("ANGLE", 10000, 0.174533) parts = arcpy.Array() for i in range(geom.partCount): part = geom.getPart(i) points = arcpy.Array() for j in range(part.count): point = part.getObject(j) point.M = geom.measureOnLine(point) points.append(point) parts.append(points) return arcpy.Polyline(parts, spatial_reference)
I suspect that's not possible, but just wanted to check to be sure.
I'm having a hard time finding a solution — something that will be executed in real time after a feature is edited. There doesn't seem to be a way to do that. Even the SDE.ST_GEOMETRY functions (for an Oracle db trigger) are too limited.
Solved! Go to Solution.
Attribute Rules can do stuff like that.
Introduction to attribute rules—ArcGIS Pro | Documentation
Attribute Rules can do stuff like that.
Introduction to attribute rules—ArcGIS Pro | Documentation
Good call. When reading the docs for Arcade, I came across this line:
"Geometry is immutable, meaning it is not possible to change the geometry after it is created."
https://developers.arcgis.com/arcade/guide/types/#geometry
So I figured Attribute Rules wouldn't be an option. But I think I must have misunderstood.
Related info here: Idea: Easy way to update geometry in real time — after an edit is saved