<?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 Re: Arcade: Iterate over line features and get endpoint in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-iterate-over-line-features-and-get-endpoint/m-p/1227832#M61804</link>
    <description>&lt;LI-CODE lang="javascript"&gt;// get all intersecting lines
var lines = FeaturesetByName($datastore, "TestLines")
var i_lines = Intersects(lines $feature)
// loop thorugh those lines, return true if any end point intersects $feature
for(var line in i_lines) {
    var end_point = Geometry(line).paths[-1][-1]
    if(Intersects(end_point, $feature)) {
        return true
    }
}
// no end point intersects $feature
return false&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 02 Nov 2022 11:28:22 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2022-11-02T11:28:22Z</dc:date>
    <item>
      <title>Arcade: Iterate over line features and get endpoint</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-iterate-over-line-features-and-get-endpoint/m-p/1227826#M61803</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I am currently working on a problem related to arc arcade, arc pro. Basically I am trying to create an attribute rule that checks if a created feature intersects with any endpoint of a featureset of polylines. For this to work I created this code:&lt;/P&gt;&lt;P&gt;for(var line in lines){&lt;/P&gt;&lt;P&gt;var endPoint = Geometry(line).paths[-1][-1]&lt;/P&gt;&lt;P&gt;return count(intersects(endPoint, Geometry($feature))) &amp;gt; 0&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;This should return "False" if the created feature is not intersecting one of the line endpoints im trying to iterate over. However all I get is a "unexpected null" error at "var endPoint". Any Ideas how i could solve the problem and get the end points of all the line features im iterating over?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 10:59:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-iterate-over-line-features-and-get-endpoint/m-p/1227826#M61803</guid>
      <dc:creator>StefanAngerer</dc:creator>
      <dc:date>2022-11-02T10:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Iterate over line features and get endpoint</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-iterate-over-line-features-and-get-endpoint/m-p/1227832#M61804</link>
      <description>&lt;LI-CODE lang="javascript"&gt;// get all intersecting lines
var lines = FeaturesetByName($datastore, "TestLines")
var i_lines = Intersects(lines $feature)
// loop thorugh those lines, return true if any end point intersects $feature
for(var line in i_lines) {
    var end_point = Geometry(line).paths[-1][-1]
    if(Intersects(end_point, $feature)) {
        return true
    }
}
// no end point intersects $feature
return false&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Nov 2022 11:28:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-iterate-over-line-features-and-get-endpoint/m-p/1227832#M61804</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-11-02T11:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Iterate over line features and get endpoint</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-iterate-over-line-features-and-get-endpoint/m-p/1227870#M61807</link>
      <description>&lt;P&gt;Your solution workes just perfect. Thank you so much for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 13:04:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-iterate-over-line-features-and-get-endpoint/m-p/1227870#M61807</guid>
      <dc:creator>StefanAngerer</dc:creator>
      <dc:date>2022-11-02T13:04:05Z</dc:date>
    </item>
  </channel>
</rss>

