<?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 Attribute rule using json curve not working in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-using-json-curve-not-working/m-p/1002227#M34350</link>
    <description>&lt;P&gt;I am testing attribute rules and geometry.&amp;nbsp; I am able to change line geometry using paths but curves do not appear to work. Both are "valid expressions".&amp;nbsp; (I am using ArcGIS Pro 2.6 Patch 3 on a geodatabase)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adds a vertex offset from the line&amp;nbsp; (works)&lt;BR /&gt;----------------------------------------------------&lt;BR /&gt;var paths = geometry($feature).paths&lt;BR /&gt;var first_point = paths[0][0]&lt;BR /&gt;var last_point = paths[0][Count(paths[0])-1]&lt;BR /&gt;var x1 = first_point.x&lt;BR /&gt;var y1 = first_point.y&lt;BR /&gt;var x2 = last_point.x&lt;BR /&gt;var y2 = last_point.y&lt;BR /&gt;var xc = (x1 + x2) / 2&lt;BR /&gt;var yc = y1&lt;/P&gt;&lt;P&gt;var newline = PolyLine({"paths": [ [[x1,y1],[xc,yc],[x2,y2]]],"spatialReference": Geometry($feature).spatialReference});&lt;BR /&gt;return newline;&lt;/P&gt;&lt;P&gt;------------------ Curve Not Working - same coordinate pairs as above ---------------------&lt;/P&gt;&lt;P&gt;var paths = geometry($feature).paths&lt;BR /&gt;var first_point = paths[0][0]&lt;BR /&gt;var last_point = paths[0][Count(paths[0])-1]&lt;BR /&gt;var x1 = first_point.x&lt;BR /&gt;var y1 = first_point.y&lt;BR /&gt;var x2 = last_point.x&lt;BR /&gt;var y2 = last_point.y&lt;BR /&gt;var xc = (x1 + x2) / 2&lt;BR /&gt;var yc = y1&lt;BR /&gt;var newline = polyline(Geometry({"curvePaths": [[[x1,y1], {"c": [[xc,yc],[x2,y2]]} ]],"spatialReference": Geometry($feature).spatialReference }))&lt;BR /&gt;return newline;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2020 18:18:35 GMT</pubDate>
    <dc:creator>DeanAnderson2</dc:creator>
    <dc:date>2020-11-17T18:18:35Z</dc:date>
    <item>
      <title>Attribute rule using json curve not working</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-using-json-curve-not-working/m-p/1002227#M34350</link>
      <description>&lt;P&gt;I am testing attribute rules and geometry.&amp;nbsp; I am able to change line geometry using paths but curves do not appear to work. Both are "valid expressions".&amp;nbsp; (I am using ArcGIS Pro 2.6 Patch 3 on a geodatabase)&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adds a vertex offset from the line&amp;nbsp; (works)&lt;BR /&gt;----------------------------------------------------&lt;BR /&gt;var paths = geometry($feature).paths&lt;BR /&gt;var first_point = paths[0][0]&lt;BR /&gt;var last_point = paths[0][Count(paths[0])-1]&lt;BR /&gt;var x1 = first_point.x&lt;BR /&gt;var y1 = first_point.y&lt;BR /&gt;var x2 = last_point.x&lt;BR /&gt;var y2 = last_point.y&lt;BR /&gt;var xc = (x1 + x2) / 2&lt;BR /&gt;var yc = y1&lt;/P&gt;&lt;P&gt;var newline = PolyLine({"paths": [ [[x1,y1],[xc,yc],[x2,y2]]],"spatialReference": Geometry($feature).spatialReference});&lt;BR /&gt;return newline;&lt;/P&gt;&lt;P&gt;------------------ Curve Not Working - same coordinate pairs as above ---------------------&lt;/P&gt;&lt;P&gt;var paths = geometry($feature).paths&lt;BR /&gt;var first_point = paths[0][0]&lt;BR /&gt;var last_point = paths[0][Count(paths[0])-1]&lt;BR /&gt;var x1 = first_point.x&lt;BR /&gt;var y1 = first_point.y&lt;BR /&gt;var x2 = last_point.x&lt;BR /&gt;var y2 = last_point.y&lt;BR /&gt;var xc = (x1 + x2) / 2&lt;BR /&gt;var yc = y1&lt;BR /&gt;var newline = polyline(Geometry({"curvePaths": [[[x1,y1], {"c": [[xc,yc],[x2,y2]]} ]],"spatialReference": Geometry($feature).spatialReference }))&lt;BR /&gt;return newline;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 18:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-using-json-curve-not-working/m-p/1002227#M34350</guid>
      <dc:creator>DeanAnderson2</dc:creator>
      <dc:date>2020-11-17T18:18:35Z</dc:date>
    </item>
  </channel>
</rss>

