<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Update geometry after edit in real time — via Arcade? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/update-geometry-after-edit-in-real-time-via-arcade/m-p/1147364#M51912</link>
    <description>&lt;P&gt;Using Arcade:&lt;/P&gt;&lt;P&gt;Is there a way to update the geometry of an existing feature after an edit is made?&lt;/P&gt;&lt;P&gt;It would be the equivalent of a DB trigger, but using logic similar to the Python field calculator script below:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;#written for ArcMap (&lt;A href="https://gis.stackexchange.com/q/423806/62572" target="_blank" rel="noopener"&gt;https://gis.stackexchange.com/q/423806/62572&lt;/A&gt;)&lt;BR /&gt;def&lt;/SPAN&gt; &lt;SPAN class=""&gt;new_shape&lt;/SPAN&gt;(&lt;SPAN class=""&gt;geom&lt;/SPAN&gt;):
    spatial_reference = geom.spatialReference
    geom = geom.densify(&lt;SPAN class=""&gt;"ANGLE"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;10000&lt;/SPAN&gt;, &lt;SPAN class=""&gt;0.174533&lt;/SPAN&gt;)
    parts = arcpy.Array()
    &lt;SPAN class=""&gt;for&lt;/SPAN&gt; i &lt;SPAN class=""&gt;in&lt;/SPAN&gt; &lt;SPAN class=""&gt;range&lt;/SPAN&gt;(geom.partCount):
        part = geom.getPart(i)
        points = arcpy.Array()
        &lt;SPAN class=""&gt;for&lt;/SPAN&gt; j &lt;SPAN class=""&gt;in&lt;/SPAN&gt; &lt;SPAN class=""&gt;range&lt;/SPAN&gt;(part.count):
            point = part.getObject(j)
            point.M = geom.measureOnLine(point)
            points.append(point)
        parts.append(points)
    &lt;SPAN class=""&gt;return&lt;/SPAN&gt; arcpy.Polyline(parts, spatial_reference)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I suspect that's not possible, but just wanted to check to be sure.&lt;/P&gt;&lt;P&gt;I'm having a hard time finding a solution — something that will be executed in &lt;STRONG&gt;real time&lt;/STRONG&gt; 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Feb 2022 15:28:04 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2022-02-24T15:28:04Z</dc:date>
    <item>
      <title>Update geometry after edit in real time — via Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/update-geometry-after-edit-in-real-time-via-arcade/m-p/1147364#M51912</link>
      <description>&lt;P&gt;Using Arcade:&lt;/P&gt;&lt;P&gt;Is there a way to update the geometry of an existing feature after an edit is made?&lt;/P&gt;&lt;P&gt;It would be the equivalent of a DB trigger, but using logic similar to the Python field calculator script below:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;#written for ArcMap (&lt;A href="https://gis.stackexchange.com/q/423806/62572" target="_blank" rel="noopener"&gt;https://gis.stackexchange.com/q/423806/62572&lt;/A&gt;)&lt;BR /&gt;def&lt;/SPAN&gt; &lt;SPAN class=""&gt;new_shape&lt;/SPAN&gt;(&lt;SPAN class=""&gt;geom&lt;/SPAN&gt;):
    spatial_reference = geom.spatialReference
    geom = geom.densify(&lt;SPAN class=""&gt;"ANGLE"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;10000&lt;/SPAN&gt;, &lt;SPAN class=""&gt;0.174533&lt;/SPAN&gt;)
    parts = arcpy.Array()
    &lt;SPAN class=""&gt;for&lt;/SPAN&gt; i &lt;SPAN class=""&gt;in&lt;/SPAN&gt; &lt;SPAN class=""&gt;range&lt;/SPAN&gt;(geom.partCount):
        part = geom.getPart(i)
        points = arcpy.Array()
        &lt;SPAN class=""&gt;for&lt;/SPAN&gt; j &lt;SPAN class=""&gt;in&lt;/SPAN&gt; &lt;SPAN class=""&gt;range&lt;/SPAN&gt;(part.count):
            point = part.getObject(j)
            point.M = geom.measureOnLine(point)
            points.append(point)
        parts.append(points)
    &lt;SPAN class=""&gt;return&lt;/SPAN&gt; arcpy.Polyline(parts, spatial_reference)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I suspect that's not possible, but just wanted to check to be sure.&lt;/P&gt;&lt;P&gt;I'm having a hard time finding a solution — something that will be executed in &lt;STRONG&gt;real time&lt;/STRONG&gt; 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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 15:28:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/update-geometry-after-edit-in-real-time-via-arcade/m-p/1147364#M51912</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-02-24T15:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: Update geometry after edit in real time — via Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/update-geometry-after-edit-in-real-time-via-arcade/m-p/1147415#M51921</link>
      <description>&lt;P&gt;Attribute Rules can do stuff like that.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/2.8/help/data/geodatabases/overview/an-overview-of-attribute-rules.htm" target="_blank"&gt;Introduction to attribute rules—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 06:25:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/update-geometry-after-edit-in-real-time-via-arcade/m-p/1147415#M51921</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-02-24T06:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Update geometry after edit in real time — via Arcade?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/update-geometry-after-edit-in-real-time-via-arcade/m-p/1147543#M51940</link>
      <description>&lt;P&gt;Good call. When reading the docs for Arcade, I came across this line:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Geometry is immutable, meaning it is not possible to change the geometry after it is created."&lt;/EM&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/arcade/guide/types/#geometry" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developers.arcgis.com/arcade/guide/types/#geometry&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So I figured Attribute Rules wouldn't be an option. But I think I must have misunderstood.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Related info here: &lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/easy-way-to-update-geometry-in-real-time-after-an/idc-p/1147528#M18816" target="_self"&gt;Idea: Easy way to update geometry in real time — after an edit is saved&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 15:26:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/update-geometry-after-edit-in-real-time-via-arcade/m-p/1147543#M51940</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-02-24T15:26:32Z</dc:date>
    </item>
  </channel>
</rss>

