Select to view content in your preferred language

Easy way to update geometry in real time — after an edit is saved

959
3
02-23-2022 05:48 PM
Status: Closed
Labels (1)
Bud
by
Esteemed Contributor

It would be great if there were an easy way to update the geometry of existing features in real time / 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:

#Updates the vertices of existing features
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)


Currently, there doesn't seem to be an easy way to do that in ArcGIS Pro, without customizing via a .NET add-in.

And unfortunately, it's not possible in the DB either, since the SDE.ST_GEOMETRY (Oracle) functions are too limited.

3 Comments
Bud
by

@Scott_Harris 

Thanks! I'd been reading the docs for Arcade, and 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 (which I think use Arcade) wouldn't be an option. But I must have misunderstood.

 

Scott_Harris
Status changed to: Closed

No problem @Bud !

I'll set the status of the Idea to closed. If you end up trying Attribute Rules, a good place for questions is https://community.esri.com/t5/attribute-rules/ct-p/attribute-rules