<?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 Parameterized Rule in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/parameterized-rule/m-p/247121#M3266</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to figure out how big a percent an area of a surface is compared to the area of multiple surfaces.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/359114_4.JPG" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope somebody has any idea of how this can be achieved, basically, I want to know how big a percent each of the A3 is compared to the sum of all the A3's. This is the&amp;nbsp;code&amp;nbsp;I have been&amp;nbsp;writing.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;attr rotateLot = 0&lt;BR /&gt;attr b1 = 40&lt;BR /&gt;attr r1 = 10&lt;BR /&gt;attr s1 = 40&lt;BR /&gt;attr r2 = 20&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;attr a0Dist =50&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;attr dist01 = 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lot --&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alignScopeToGeometry(yUp, 1)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rotateScope (0,rotateLot,0) &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;split(x) { b1 : A01 | r1 : B01 | ~1 : A01 | r2: C01 | s1 : D01}&lt;/P&gt;&lt;P&gt;A01 --&amp;gt; &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;split(z) {a0Dist : A02 | a0Dist : A02 | ~1 : Grass}&lt;/P&gt;&lt;P&gt;A02 --&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;innerRectangle(edge) {shape : A03(geometry.area) | remainder = Grass}&lt;/P&gt;&lt;P&gt;A03(area)--&amp;gt; &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(area)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;when running the script the console prints the area for the four A03 shapes, is there any way to get the sum of that "list"? If I find the sum the goal is to take the sum and then divide that by the area of each individual shape in order to figure out how large a percent each shape is compared to the whole.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope somebody knows how this can be done, or at least an idea of where to look.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jun 2017 15:42:21 GMT</pubDate>
    <dc:creator>KristianMortensen1</dc:creator>
    <dc:date>2017-06-28T15:42:21Z</dc:date>
    <item>
      <title>Parameterized Rule</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/parameterized-rule/m-p/247121#M3266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to figure out how big a percent an area of a surface is compared to the area of multiple surfaces.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/359114_4.JPG" /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope somebody has any idea of how this can be achieved, basically, I want to know how big a percent each of the A3 is compared to the sum of all the A3's. This is the&amp;nbsp;code&amp;nbsp;I have been&amp;nbsp;writing.&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;attr rotateLot = 0&lt;BR /&gt;attr b1 = 40&lt;BR /&gt;attr r1 = 10&lt;BR /&gt;attr s1 = 40&lt;BR /&gt;attr r2 = 20&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;attr a0Dist =50&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;attr dist01 = 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lot --&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;alignScopeToGeometry(yUp, 1)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rotateScope (0,rotateLot,0) &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;split(x) { b1 : A01 | r1 : B01 | ~1 : A01 | r2: C01 | s1 : D01}&lt;/P&gt;&lt;P&gt;A01 --&amp;gt; &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;split(z) {a0Dist : A02 | a0Dist : A02 | ~1 : Grass}&lt;/P&gt;&lt;P&gt;A02 --&amp;gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;innerRectangle(edge) {shape : A03(geometry.area) | remainder = Grass}&lt;/P&gt;&lt;P&gt;A03(area)--&amp;gt; &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(area)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;when running the script the console prints the area for the four A03 shapes, is there any way to get the sum of that "list"? If I find the sum the goal is to take the sum and then divide that by the area of each individual shape in order to figure out how large a percent each shape is compared to the whole.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope somebody knows how this can be done, or at least an idea of where to look.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2017 15:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/parameterized-rule/m-p/247121#M3266</guid>
      <dc:creator>KristianMortensen1</dc:creator>
      <dc:date>2017-06-28T15:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized Rule</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/parameterized-rule/m-p/247122#M3267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With reports, you can report the area of each A3 plot, and you can also retrieve the sum of these areas. &amp;nbsp;Then, in the dashboard, you can create a chart that divides each A3 plot area by the sum to get the percentage area for each A3 plot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the rule above, you don't need to pass geometry.area to the A03 rule because you can just call it in the A03 rule. &amp;nbsp;Then, you can report this area. &amp;nbsp;Then, all reports will be summed, and you can see the SUM (along with the count, min, max, avg) for the report called "AreaA3" in the Reports section in the Inspector. &amp;nbsp;This will be the sum coming from all objects that are selected.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;report("AreaA3", geometry.area)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also create a dashboard which will display the sum for all objects in the scene (whether they are selected or not). &amp;nbsp;Window -&amp;gt; Show Dashboard -&amp;gt; Add a Chart -&amp;gt; Select the report -&amp;gt; Key number -&amp;gt; Report = AreaA3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, you can use sub-reports to create a column for each A3 plot in a&amp;nbsp;bar chart. &amp;nbsp;The suffix after the period is the sub-report name. &amp;nbsp;Then, select the parent report (name before the period) to create a bar chart in the dashboard. &amp;nbsp;To create names for the sub-reports, you could use the indices from the splits to create a unique name for each A3 plot.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;lot --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alignScopeToGeometry(yUp, 1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rotateScope (0,rotateLot,0) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; split(x) { b1 : A01(split.index) | r1 : B01 | ~1 : A01(split.index) | r2: C01 | s1 : D01}
A01(ind1) --&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; split(z) {a0Dist : A02(ind1, split.index) | a0Dist : A02(ind1, split.index) | ~1 : Grass}
A02(ind1, ind2) --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; innerRectangle(edge) {shape : A03(ind1, ind2) | remainder = Grass}
A03(ind1, ind2)--&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(area)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; report("AreaA3." + ind1 + "_" + ind2, geometry.area)
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the Dashboard, you could create a bar/pie/stack chart with Report = AreaA3.* and Divide By = AreaA3. &amp;nbsp;Then each bar/section in the chart will represent an A3 plot and will show its percentage area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a tutorial on reporting:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial-11-reporting.htm" title="http://desktop.arcgis.com/en/cityengine/latest/tutorials/tutorial-11-reporting.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Tutorial 11: Reporting—CityEngine Tutorials | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:17:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/parameterized-rule/m-p/247122#M3267</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2021-12-11T12:17:49Z</dc:date>
    </item>
  </channel>
</rss>

