<?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 How To Use Attribute Rules to Calculate Geometry of Polylines in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-attribute-rules-to-calculate-geometry/m-p/1227266#M61752</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am creating Attribute Rules for some feature classes. I have been able to successfully create rules to calculate the X &amp;amp; Y of my point feature classes, but I have some polyline feature classes that need some geometry calculations performed. I need to be have an attribute rule(s) that would calculate the X &amp;amp; Y of both the start of the line and the end of the line. This rule would run on Insert and Update. I have four attribute fields (Upstream X, Upstream Y, Downstream X, &amp;amp; Downstream Y).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance.&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2022 21:25:33 GMT</pubDate>
    <dc:creator>BenWagner3</dc:creator>
    <dc:date>2022-10-31T21:25:33Z</dc:date>
    <item>
      <title>How To Use Attribute Rules to Calculate Geometry of Polylines</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-attribute-rules-to-calculate-geometry/m-p/1227266#M61752</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am creating Attribute Rules for some feature classes. I have been able to successfully create rules to calculate the X &amp;amp; Y of my point feature classes, but I have some polyline feature classes that need some geometry calculations performed. I need to be have an attribute rule(s) that would calculate the X &amp;amp; Y of both the start of the line and the end of the line. This rule would run on Insert and Update. I have four attribute fields (Upstream X, Upstream Y, Downstream X, &amp;amp; Downstream Y).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance.&lt;/P&gt;&lt;P&gt;-Ben&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 21:25:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-attribute-rules-to-calculate-geometry/m-p/1227266#M61752</guid>
      <dc:creator>BenWagner3</dc:creator>
      <dc:date>2022-10-31T21:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: How To Use Attribute Rules to Calculate Geometry of Polylines</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-attribute-rules-to-calculate-geometry/m-p/1227368#M61763</link>
      <description>&lt;LI-CODE lang="javascript"&gt;// Calculation attribute rule on the line fc
// triggers: Insert, Update
// Field: empty

// get the $feature's geometry
var geom = Geometry($feature)
// null geometry -&amp;gt; abort
if(geom == null) { return }
// get start and end point
var p_start = geom.paths[0][0]
var p_end = geom.paths[-1][-1]
// return the x and y values of those points
return {
    "result": {"attributes": {
        "UpstreamX": p_start.x,
        "UpstreamY": p_start.y,
        "DownstreamX": p_end.x,
        "DownstreamY": p_end.y
    }}
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 01 Nov 2022 08:03:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-attribute-rules-to-calculate-geometry/m-p/1227368#M61763</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-11-01T08:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: How To Use Attribute Rules to Calculate Geometry of Polylines</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-attribute-rules-to-calculate-geometry/m-p/1227651#M61789</link>
      <description>&lt;P&gt;Johannes,&lt;/P&gt;&lt;P&gt;When trying your expression, the expression validates fine, but when saving the attribute rule I get an Error 002941 "An expected Field was not found or could not be retrieved properly." The attribute field names match exact with my feature class attribute fields.&lt;/P&gt;&lt;P&gt;I've attached a screenshot.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 20:28:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-attribute-rules-to-calculate-geometry/m-p/1227651#M61789</guid>
      <dc:creator>BenWagner3</dc:creator>
      <dc:date>2022-11-01T20:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: How To Use Attribute Rules to Calculate Geometry of Polylines</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-attribute-rules-to-calculate-geometry/m-p/1227790#M61800</link>
      <description>&lt;P&gt;First thing that comes to mind: You have to use the actual field &lt;STRONG&gt;names&lt;/STRONG&gt;, not the &lt;STRONG&gt;aliases&lt;/STRONG&gt;. If you have spaces in lines 15-18, you're using aliases.&lt;/P&gt;&lt;P&gt;If that doesn't solve it, please post your code and a screenshot of the field view of your feature class.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 07:21:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-attribute-rules-to-calculate-geometry/m-p/1227790#M61800</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-11-02T07:21:04Z</dc:date>
    </item>
  </channel>
</rss>

