<?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: Using ModelBuilder to calculate values for line segments in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-modelbuilder-to-calculate-values-for-line/m-p/640101#M49868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For the most part I believe the segments are numbered in the correct order.&amp;nbsp; I am fairly new at model builder and have never used Python so I'm not sure where to even begin.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Feb 2014 19:49:04 GMT</pubDate>
    <dc:creator>ReneeCarson</dc:creator>
    <dc:date>2014-02-11T19:49:04Z</dc:date>
    <item>
      <title>Using ModelBuilder to calculate values for line segments</title>
      <link>https://community.esri.com/t5/python-questions/using-modelbuilder-to-calculate-values-for-line/m-p/640099#M49866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to build a model in Arc Desktop 10 where the sum of two fields is equal to the third field.&amp;nbsp; For example, I have a line with various segments.&amp;nbsp; In the attribute table, one of the fields is the Begin_Measure field which is 0 for the first segment.&amp;nbsp; The second field is Segment_Length which has a value (let's say 10).&amp;nbsp; The third field is the End_Measure, which should be the sum of the first two (in this case, 10).&amp;nbsp; The value of the first End_Measure becomes the value of the second Begin_Measure, and so on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The real problem I'm having with this is that I do not have values for the Begin_Measure for any but the first segment, and I am having to run the Field Calculator for each segment.&amp;nbsp; Is there a way to build a model that will calculate the fields for each segment automatically?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 18:38:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-modelbuilder-to-calculate-values-for-line/m-p/640099#M49866</guid>
      <dc:creator>ReneeCarson</dc:creator>
      <dc:date>2014-02-11T18:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using ModelBuilder to calculate values for line segments</title>
      <link>https://community.esri.com/t5/python-questions/using-modelbuilder-to-calculate-values-for-line/m-p/640100#M49867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am trying to build a model in Arc Desktop 10 where the sum of two fields is equal to the third field.&amp;nbsp; For example, I have a line with various segments.&amp;nbsp; In the attribute table, one of the fields is the Begin_Measure field which is 0 for the first segment.&amp;nbsp; The second field is Segment_Length which has a value (let's say 10).&amp;nbsp; The third field is the End_Measure, which should be the sum of the first two (in this case, 10).&amp;nbsp; The value of the first End_Measure becomes the value of the second Begin_Measure, and so on.&lt;BR /&gt;&lt;BR /&gt;The real problem I'm having with this is that I do not have values for the Begin_Measure for any but the first segment, and I am having to run the Field Calculator for each segment.&amp;nbsp; Is there a way to build a model that will calculate the fields for each segment automatically?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If your segments are numbered in the correct order that would chain them together to form your ultimate line for each route then you can do this with a python cursor.&amp;nbsp; You have to keep track of any RouteID change.&amp;nbsp; A variable would keep track of the accumulated lengths as each record is processed by the cursor and reset when a new route is begun.&amp;nbsp; The Field Calculator cannot do what you want, since it does not permit sort ordered record processing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 18:44:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-modelbuilder-to-calculate-values-for-line/m-p/640100#M49867</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-02-11T18:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using ModelBuilder to calculate values for line segments</title>
      <link>https://community.esri.com/t5/python-questions/using-modelbuilder-to-calculate-values-for-line/m-p/640101#M49868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For the most part I believe the segments are numbered in the correct order.&amp;nbsp; I am fairly new at model builder and have never used Python so I'm not sure where to even begin.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 19:49:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-modelbuilder-to-calculate-values-for-line/m-p/640101#M49868</guid>
      <dc:creator>ReneeCarson</dc:creator>
      <dc:date>2014-02-11T19:49:04Z</dc:date>
    </item>
  </channel>
</rss>

