<?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 CGA for Add Array in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-for-add-array/m-p/1245532#M10821</link>
    <description>&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Hi folks,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;I have a Rule that repeats multiple times,&amp;nbsp;and I want to use that rule's number of iteration for another Rule as a dynamic parameter.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;It is possible to check the number of iterations using the 'report operation' - [SUM], but as far as I know it is impossible to use this number as a parameter.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;So, whenever the rule is repeated, I tried to save index in the array and use size of the array as a number of iterations, but I couldn't find a way to add a new value to the already created array.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;i.e. When the number of iterations of the rule is N, sequentially changing the array like [1], [1;2], [1;2;3],...[1;...;N]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Can someone help me ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Thank you for always.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Kyle,&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 05 Jan 2023 07:46:35 GMT</pubDate>
    <dc:creator>SangmukKyleSeok</dc:creator>
    <dc:date>2023-01-05T07:46:35Z</dc:date>
    <item>
      <title>CGA for Add Array</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-for-add-array/m-p/1245532#M10821</link>
      <description>&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Hi folks,&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;I have a Rule that repeats multiple times,&amp;nbsp;and I want to use that rule's number of iteration for another Rule as a dynamic parameter.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;It is possible to check the number of iterations using the 'report operation' - [SUM], but as far as I know it is impossible to use this number as a parameter.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;So, whenever the rule is repeated, I tried to save index in the array and use size of the array as a number of iterations, but I couldn't find a way to add a new value to the already created array.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;i.e. When the number of iterations of the rule is N, sequentially changing the array like [1], [1;2], [1;2;3],...[1;...;N]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Can someone help me ?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Thank you for always.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Kyle,&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 Jan 2023 07:46:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-for-add-array/m-p/1245532#M10821</guid>
      <dc:creator>SangmukKyleSeok</dc:creator>
      <dc:date>2023-01-05T07:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: CGA for Add Array</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-for-add-array/m-p/1246417#M10824</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/482677"&gt;@SangmukKyleSeok&lt;/a&gt;&amp;nbsp; for your question.&amp;nbsp;&lt;BR /&gt;New values can be appended to arrays with this notation:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Generate --&amp;gt; Iterate([0, 1])

Iterate(c)--&amp;gt;
	case size(c) &amp;gt;= 10: print(c)
	else: Iterate([c, size(c)+1])&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Please have a look at the example in the CGA help:&lt;BR /&gt;&lt;A href="https://doc.arcgis.com/en/cityengine/latest/cga/cga-array-initialization-function.htm" target="_blank"&gt;array initialization function—ArcGIS CityEngine Resources | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 14:01:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-for-add-array/m-p/1246417#M10824</guid>
      <dc:creator>ThomasFuchs</dc:creator>
      <dc:date>2023-01-09T14:01:51Z</dc:date>
    </item>
  </channel>
</rss>

