<?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: Script evaluators element variables in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/script-evaluators-element-variables/m-p/423080#M4000</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;The network element script evaluators are based on the ArcObjects API.&amp;nbsp; &lt;SPAN style="background: white;"&gt;To explain some of the sections of the dialog in your screenshot:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="margin-top: 0in;"&gt;&lt;LI style="color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 11.5pt; background: white;"&gt;Element Variables: These are the objects that you can reference in the code block.&amp;nbsp; For evaluating edges, the only valid element variable is the Edge element itself.&amp;nbsp; In your screenshot, you see Turn, fromEdge, toEdge, and atJunction.&amp;nbsp; These are all network elements associated with a Turn.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="margin-top: 0in;"&gt;&lt;LI style="color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 11.5pt; background: white;"&gt;Types: This changes the available functions in the Element Functions section.&amp;nbsp; For example, select &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkTurn2.htm"&gt;Turn&lt;/A&gt; and you get the &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkTurn2_Angle.htm"&gt;Angle&lt;/A&gt; function.&amp;nbsp; Select &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkJunction2.htm"&gt;Junction&lt;/A&gt; and you get the &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkJunction2_TurnCount.htm"&gt;TurnCount&lt;/A&gt; function.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="margin-top: 0in;"&gt;&lt;LI style="color: #3d3d3d; margin-bottom: 12.0pt;"&gt;&lt;SPAN style="font-size: 11.5pt; background: white;"&gt;Element Functions:&amp;nbsp; These are the methods available to work on the chosen element type object.&amp;nbsp; These should correspond to the methods on &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkEdge2.htm"&gt;INetworkEdge2&lt;/A&gt;, &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkTurn2.htm"&gt;INetworkTurn2&lt;/A&gt;, and &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkJunction2.htm"&gt;INetworkJunction2&lt;/A&gt;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Feb 2018 22:20:00 GMT</pubDate>
    <dc:creator>PatrickStevens</dc:creator>
    <dc:date>2018-02-14T22:20:00Z</dc:date>
    <item>
      <title>Script evaluators element variables</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/script-evaluators-element-variables/m-p/423079#M3999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In script evaluators how element variables work?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following Element Variables are available:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Turn&lt;/LI&gt;&lt;LI&gt;fromEdge&lt;/LI&gt;&lt;LI&gt;atJunction&lt;/LI&gt;&lt;LI&gt;toEdge&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/396435_Καταγραφή.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does "fromEdge" mean the previous edge and "toEdge" the next edge? Is there any documentation for Element Functions such as ToAzimuth, FromPositin, PositionAlongObject etc?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 12:49:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/script-evaluators-element-variables/m-p/423079#M3999</guid>
      <dc:creator>sotokan80_</dc:creator>
      <dc:date>2018-02-13T12:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Script evaluators element variables</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/script-evaluators-element-variables/m-p/423080#M4000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;The network element script evaluators are based on the ArcObjects API.&amp;nbsp; &lt;SPAN style="background: white;"&gt;To explain some of the sections of the dialog in your screenshot:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="margin-top: 0in;"&gt;&lt;LI style="color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 11.5pt; background: white;"&gt;Element Variables: These are the objects that you can reference in the code block.&amp;nbsp; For evaluating edges, the only valid element variable is the Edge element itself.&amp;nbsp; In your screenshot, you see Turn, fromEdge, toEdge, and atJunction.&amp;nbsp; These are all network elements associated with a Turn.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="margin-top: 0in;"&gt;&lt;LI style="color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 11.5pt; background: white;"&gt;Types: This changes the available functions in the Element Functions section.&amp;nbsp; For example, select &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkTurn2.htm"&gt;Turn&lt;/A&gt; and you get the &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkTurn2_Angle.htm"&gt;Angle&lt;/A&gt; function.&amp;nbsp; Select &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkJunction2.htm"&gt;Junction&lt;/A&gt; and you get the &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkJunction2_TurnCount.htm"&gt;TurnCount&lt;/A&gt; function.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="margin: 0in; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;UL style="margin-top: 0in;"&gt;&lt;LI style="color: #3d3d3d; margin-bottom: 12.0pt;"&gt;&lt;SPAN style="font-size: 11.5pt; background: white;"&gt;Element Functions:&amp;nbsp; These are the methods available to work on the chosen element type object.&amp;nbsp; These should correspond to the methods on &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkEdge2.htm"&gt;INetworkEdge2&lt;/A&gt;, &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkTurn2.htm"&gt;INetworkTurn2&lt;/A&gt;, and &lt;A href="https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#INetworkJunction2.htm"&gt;INetworkJunction2&lt;/A&gt;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 22:20:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/script-evaluators-element-variables/m-p/423080#M4000</guid>
      <dc:creator>PatrickStevens</dc:creator>
      <dc:date>2018-02-14T22:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Script evaluators element variables</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/script-evaluators-element-variables/m-p/423081#M4001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Than you very much for your reply. I m trying to promote straight lines in my solver. Each street segment has a NON UNIQUE FID value. ie Richmond Avenue's street segments have FID value = 12345. Is it possible to write a script based on the following pseudocode?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a=fromEdge.AttributeValuebyName("FID")&lt;/P&gt;&lt;P&gt;b=toEdge.AttributeValuebyName("FID")&lt;/P&gt;&lt;P&gt;If a=b then dont turn&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what type of element should i use for that, turn or edge?And last but not least the edges and the junctions are evaluated based on what value(time, length)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 22:52:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/script-evaluators-element-variables/m-p/423081#M4001</guid>
      <dc:creator>sotokan80_</dc:creator>
      <dc:date>2018-02-14T22:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Script evaluators element variables</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/script-evaluators-element-variables/m-p/423082#M4002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand correctly, you would like to discourage turns where possible.&amp;nbsp; I don't think what you are proposing would work with the script evaluator.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think some functionality that might do what you want is the &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/global-turns-about-global-turns.htm"&gt;Global Turn Delay Evaluator&lt;/A&gt;.&amp;nbsp; The purpose of that evaluator is to discourage turns by applying a cost penalty that makes turning more expensive.&amp;nbsp; That might be your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To take a step back, though, why do you want to discourage turns?&amp;nbsp; Is the vehicle that is travelling too big to make many turns? If that is the case, the Global Turn Delay Evaluator seems correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or are you getting routes that leave major roads and stair-steps through communities?&amp;nbsp; In this case, the best answer is probably to adjust the travel times along the roads that you prefer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2018 23:51:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/script-evaluators-element-variables/m-p/423082#M4002</guid>
      <dc:creator>PatrickStevens</dc:creator>
      <dc:date>2018-02-14T23:51:45Z</dc:date>
    </item>
  </channel>
</rss>

