<?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: Finding the sum of split.index in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/finding-the-sum-of-split-index/m-p/1604341#M11549</link>
    <description>&lt;P&gt;Thanks for your answer - I want to get the total electricity consumption of the floors and then display it in the report panel at the top of the building. I used the same method as you but it gives the wrong result. I think I need to find a way to associate the amount of electricity consumed by each floor with numerical indices split.index via the set command. If you have any ideas on this, I would be happy to hear it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="maziaryousefi_0-1744226301870.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129827i53E80A117E44662D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="maziaryousefi_0-1744226301870.jpeg" alt="maziaryousefi_0-1744226301870.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="maziaryousefi_0-1744308868137.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130012iD58E6FBFCEF3C9A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="maziaryousefi_0-1744308868137.png" alt="maziaryousefi_0-1744308868137.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Apr 2025 18:14:45 GMT</pubDate>
    <dc:creator>maziaryousefi</dc:creator>
    <dc:date>2025-04-10T18:14:45Z</dc:date>
    <item>
      <title>Finding the sum of split.index</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/finding-the-sum-of-split-index/m-p/1603043#M11543</link>
      <description>&lt;P&gt;Hello everyone. Is there a way to get the sum of the numbers generated by the division command using split.index? For example, we have a 5-story building and if we use the split.index command, the floors start from zero and finally the 5th floor receives the number 4 and the sum is 10, that is, 0+1+2+3+4 = 10&lt;/P&gt;</description>
      <pubDate>Sat, 05 Apr 2025 17:44:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/finding-the-sum-of-split-index/m-p/1603043#M11543</guid>
      <dc:creator>maziaryousefi</dc:creator>
      <dc:date>2025-04-05T17:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the sum of split.index</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/finding-the-sum-of-split-index/m-p/1603175#M11544</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/462107"&gt;@maziaryousefi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I believe &lt;EM&gt;split.total&lt;/EM&gt; shape attribute is what you are looking for. Let's say you split your mass into three pieces, then&lt;EM&gt; split.index&lt;/EM&gt; is 0,1,2 and &lt;EM&gt;split.total&lt;/EM&gt; is 3.&lt;/P&gt;&lt;P&gt;See also &lt;A href="https://doc.arcgis.com/en/cityengine/2023.1/cga/cga-split-attribute.htm" target="_blank" rel="noopener"&gt;split shape attribute&lt;/A&gt;&amp;nbsp; in the CGA reference.&lt;/P&gt;&lt;P&gt;Cheers&lt;BR /&gt;Jonas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Apr 2025 06:56:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/finding-the-sum-of-split-index/m-p/1603175#M11544</guid>
      <dc:creator>JonasObertuefer</dc:creator>
      <dc:date>2025-04-07T06:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the sum of split.index</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/finding-the-sum-of-split-index/m-p/1603615#M11546</link>
      <description>&lt;P class=""&gt;I'm curious whether your goal is simply to compute the sum of split.index values,&lt;BR /&gt;or if you also want to &lt;STRONG&gt;pass that sum into other rules&lt;/STRONG&gt; for further use.&lt;/P&gt;&lt;P class=""&gt;If your goal is just to calculate the sum, you can use the formula&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; "(split.total - 1) * split.total / 2"&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class=""&gt;If you'd like to pass the calculated value to other rules and use it there, you can write it like this:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;attr unitHeight = 2   // Height of each split section

@StartRule
Lot --&amp;gt;
    extrude(10)  // Give height to the lot
    split(y){ ~unitHeight : Section }*  // Split along Y into equal parts


// Use 'with' to define sum_n as the sum of split.index values
Section 
    with ( sum_n := (split.total - 1) * split.total / 2 ) 
--&amp;gt;
    case split.index == 0 :
        Something_A(sum_n)
    ..
    ...
    ....
    else :
        Something_Else(sum_n)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;There may be various ways to approach this, so please take this as a reference only.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 08:48:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/finding-the-sum-of-split-index/m-p/1603615#M11546</guid>
      <dc:creator>desert</dc:creator>
      <dc:date>2025-04-08T08:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the sum of split.index</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/finding-the-sum-of-split-index/m-p/1604341#M11549</link>
      <description>&lt;P&gt;Thanks for your answer - I want to get the total electricity consumption of the floors and then display it in the report panel at the top of the building. I used the same method as you but it gives the wrong result. I think I need to find a way to associate the amount of electricity consumed by each floor with numerical indices split.index via the set command. If you have any ideas on this, I would be happy to hear it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="maziaryousefi_0-1744226301870.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/129827i53E80A117E44662D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="maziaryousefi_0-1744226301870.jpeg" alt="maziaryousefi_0-1744226301870.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="maziaryousefi_0-1744308868137.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130012iD58E6FBFCEF3C9A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="maziaryousefi_0-1744308868137.png" alt="maziaryousefi_0-1744308868137.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 18:14:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/finding-the-sum-of-split-index/m-p/1604341#M11549</guid>
      <dc:creator>maziaryousefi</dc:creator>
      <dc:date>2025-04-10T18:14:45Z</dc:date>
    </item>
  </channel>
</rss>

