<?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 Can values be passed on between cga files? in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572338#M7740</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am testing how to link cga files by means of the "import" operation. I want to do my site layouts (i.e. where to put buildings on the ground) in one cga file and import another cga file containing scripts for building envelopes (i.e. the form of each building) into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is: I want to be able to report the floor area ratio (FAR) for which I need the lot area and the floor areas of each building. However, the lot area is generated in the script of the first cga file while the floor areas are generated in the script of the second cga file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to pass on the floor area from an attribute in the first cga file to be used in the reporting of the second cga file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to import the lot area from file 1 into file 2, but as file 1 also imports file 2, the whole thing gets cyclical…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I do the reporting in file 1 instead? Is there a "best practice" on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you understand my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Aug 2015 14:17:49 GMT</pubDate>
    <dc:creator>NicolaiSteinø</dc:creator>
    <dc:date>2015-08-25T14:17:49Z</dc:date>
    <item>
      <title>Can values be passed on between cga files?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572338#M7740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am testing how to link cga files by means of the "import" operation. I want to do my site layouts (i.e. where to put buildings on the ground) in one cga file and import another cga file containing scripts for building envelopes (i.e. the form of each building) into it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is: I want to be able to report the floor area ratio (FAR) for which I need the lot area and the floor areas of each building. However, the lot area is generated in the script of the first cga file while the floor areas are generated in the script of the second cga file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to pass on the floor area from an attribute in the first cga file to be used in the reporting of the second cga file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to import the lot area from file 1 into file 2, but as file 1 also imports file 2, the whole thing gets cyclical…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should I do the reporting in file 1 instead? Is there a "best practice" on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you understand my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 14:17:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572338#M7740</guid>
      <dc:creator>NicolaiSteinø</dc:creator>
      <dc:date>2015-08-25T14:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can values be passed on between cga files?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572339#M7741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nicolai,&lt;/P&gt;&lt;P&gt;There are several ways to pass attributes, values, and geometry down to the imported rule.&lt;/P&gt;&lt;P&gt;First: Read everything on this page: &lt;A href="http://cehelp.esri.com/help/topic/com.procedural.cityengine.help/html/cgareference/import.html" style="line-height: 1.5;" title="http://cehelp.esri.com/help/topic/com.procedural.cityengine.help/html/cgareference/import.html"&gt;import&lt;/A&gt;&lt;SPAN style="line-height: 1.5;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. You can automatically pass attributes from parent to child rule by naming attributes the same.&lt;/P&gt;&lt;P&gt;2. You can call functions in imported rules, which return values.&lt;/P&gt;&lt;P&gt;3. You can pass values into rules in the imported file via parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can't do is:&lt;/P&gt;&lt;P&gt;1. Send geometry into the imported rule and then have it returned (unlike a function that returns values - you can't return geometry from the imported rule).&lt;/P&gt;&lt;P&gt;2. You can't have cyclical imports. Two rules that import each other is a no.&lt;/P&gt;&lt;P&gt;3. The imported rule cannot call functions or rules in the parent rule (the import&lt;EM&gt;ing&lt;/EM&gt; rule).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 18:40:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572339#M7741</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-08-25T18:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can values be passed on between cga files?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572340#M7742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm… I can make it work using a parameter, but I'll have to pass it on quite a bit, which I don't find very neat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to 1. in your answer, it would be possible to set an attr in the parent rule and pass it on to the child rule.&lt;/P&gt;&lt;P&gt;It would be nicer to set the value of an attr lotArea in the parent rule and pass it on to an identical attr in the child rule. But that doesn't seem to work. I made a test report of attr lotArea in both parent and child rule, but it only reported correctly from the parent rule. I pasted both rules below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did I misunderstand something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;/**&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;* File:&amp;nbsp;&amp;nbsp;&amp;nbsp; parent_rule.cga&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;* Created: 27 Aug 2015 21:22:33 GMT&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;* Author:&amp;nbsp; Nic&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;*/&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #3933ff;"&gt;&lt;SPAN style="color: #931a68;"&gt;version&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"2015.1"&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #3933ff;"&gt;&lt;SPAN style="color: #931a68;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; f1 : &lt;/SPAN&gt;"child_rule.cga"&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #0326cc;"&gt;&lt;SPAN style="color: #931a68;"&gt;attr&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;lotArea&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt; = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #0326cc;"&gt;&lt;SPAN style="color: #751873;"&gt;Lot&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; --&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #931a68;"&gt;case&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;scope.sx&lt;SPAN style="color: #000000;"&gt; &amp;lt; &lt;/SPAN&gt;scope.sz&lt;SPAN style="color: #000000;"&gt; : &lt;/SPAN&gt;&lt;SPAN style="color: #751873;"&gt;rotateScope&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(0,90,0) &lt;/SPAN&gt;&lt;SPAN style="color: #751873;"&gt;X&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;geometry.area&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #0326cc;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #931a68;"&gt;else&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; : &lt;/SPAN&gt;&lt;SPAN style="color: #751873;"&gt;X&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;geometry.area&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="color: #751873;"&gt;X&lt;/SPAN&gt;(sqm) --&amp;gt; &lt;SPAN style="color: #751873;"&gt;report&lt;/SPAN&gt;(&lt;SPAN style="color: #3933ff;"&gt;"lotArea"&lt;/SPAN&gt;, &lt;SPAN style="color: #0326cc;"&gt;geometry.area&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #0326cc;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #751873;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;lotArea&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;geometry.area&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #3933ff;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #751873;"&gt;report&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;"testParentLotArea"&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0326cc;"&gt;lotArea&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&amp;nbsp; &lt;SPAN style="color: #751873;"&gt;split&lt;/SPAN&gt;&lt;SPAN style="font-family: Monaco; font-size: 11px;"&gt;(x)&lt;/SPAN&gt;&lt;SPAN style="font-family: Monaco; font-size: 11px;"&gt; &lt;/SPAN&gt;{ '0.5 : &lt;SPAN style="color: #751873;"&gt;Footprint&lt;/SPAN&gt;(sqm) | '0.5 : &lt;SPAN style="color: #751873;"&gt;Green&lt;/SPAN&gt; }&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #751873;"&gt;Footprint&lt;SPAN style="color: #000000;"&gt;(sqm) --&amp;gt; &lt;/SPAN&gt;f1.Footprint&lt;SPAN style="color: #000000;"&gt;(sqm)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="color: #751873;"&gt;Green&lt;/SPAN&gt; --&amp;gt; &lt;SPAN style="color: #751873;"&gt;color&lt;/SPAN&gt;(0.5,1,0.5)&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;/**&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;* File:&amp;nbsp;&amp;nbsp;&amp;nbsp; child_rule.cga&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;* Created: 27 Aug 2015 21:22:59 GMT&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;* Author:&amp;nbsp; Nic&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #4f76cc;"&gt;*/&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #3933ff;"&gt;&lt;SPAN style="color: #931a68;"&gt;version&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;"2015.1"&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="color: #931a68;"&gt;attr&lt;/SPAN&gt; &lt;SPAN style="color: #0326cc;"&gt;bldgH&lt;/SPAN&gt; = 12&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #0326cc;"&gt;&lt;SPAN style="color: #931a68;"&gt;attr&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;floorH&lt;SPAN style="color: #000000;"&gt; = 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #0326cc;"&gt;&lt;SPAN style="color: #931a68;"&gt;attr&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;lotArea&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt; = 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #3933ff;"&gt;&lt;SPAN style="color: #751873;"&gt;Footprint&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(sqm) --&amp;gt; &lt;/SPAN&gt;&lt;SPAN style="color: #751873;"&gt;report&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;"testChildLotArea"&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0326cc;"&gt;lotArea&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&amp;nbsp; &lt;SPAN style="color: #751873;"&gt;extrude&lt;/SPAN&gt;(&lt;SPAN style="color: #0326cc;"&gt;bldgH&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&amp;nbsp; &lt;SPAN style="color: #751873;"&gt;Envelope&lt;/SPAN&gt;(sqm)&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="color: #751873;"&gt;Envelope&lt;/SPAN&gt;(sqm) --&amp;gt; &lt;SPAN style="color: #751873;"&gt;split&lt;/SPAN&gt;(y) { ~&lt;SPAN style="color: #0326cc;"&gt;floorH&lt;/SPAN&gt; : &lt;SPAN style="color: #751873;"&gt;Floor&lt;/SPAN&gt;(sqm) }*&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&lt;SPAN style="color: #751873;"&gt;Floor&lt;/SPAN&gt;(sqm) --&amp;gt; &lt;SPAN style="color: #751873;"&gt;comp&lt;/SPAN&gt;(f) { bottom : &lt;SPAN style="color: #751873;"&gt;FloorShape&lt;/SPAN&gt;(sqm) }&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco; color: #751873;"&gt;FloorShape&lt;SPAN style="color: #000000;"&gt;(sqm) --&amp;gt; &lt;/SPAN&gt;report&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #3933ff;"&gt;"floorArea"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0326cc;"&gt;geometry.area&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11px; font-family: Monaco;"&gt;&amp;nbsp; &lt;SPAN style="color: #751873;"&gt;report&lt;/SPAN&gt;(&lt;SPAN style="color: #3933ff;"&gt;"FAR"&lt;/SPAN&gt;, &lt;SPAN style="color: #0326cc;"&gt;geometry.area&lt;/SPAN&gt;/sqm) &lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;# Here I would prefer to insert the attribute "&lt;STRONG&gt;lotArea&lt;/STRONG&gt;" instead of the parameter "sqm"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 22:29:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572340#M7742</guid>
      <dc:creator>NicolaiSteinø</dc:creator>
      <dc:date>2015-08-27T22:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can values be passed on between cga files?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572341#M7743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before talking about the main question, there is an error in your parent rule that should stop it from compiling. In this line:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;split { '0.5 : Footprint(sqm) | '0.5 : Green }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;There needs to be a axis supplied for the split operation, like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;split ( x ) { '0.5 : Footprint(sqm) | '0.5 : Green }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 16:42:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572341#M7743</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-08-31T16:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can values be passed on between cga files?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572342#M7744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the split command has the correct syntax in my actual rule file – don't know why it's missing above…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, I still cannot make the child file adopt the attribute values of namesake attributes in the parent file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue is not just an aesthetic one (that it looks nicer). Passing on parameters a long way is also more prone to errors. Besides, I plan to link multiple child files to the parent file, all of which will use the lotArea parameter value. It is going to be a lot of Ariadne threads of parameters to keep track of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you see, I inserted a &lt;SPAN style="color: #751873;"&gt;report&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;"testChildLotArea"&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0326cc;"&gt;lotArea&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt; operation in the Footprint rule of the child rule. In the inspector, this reports the initial value of the attribute (of the child rule file). Had the value been passed on from the parent rule file equivalent, I would expect that value (which is set) to be reported. Or am I wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions to a solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it a CE 2015.1 bug?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Sep 2015 20:07:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572342#M7744</guid>
      <dc:creator>NicolaiSteinø</dc:creator>
      <dc:date>2015-09-07T20:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can values be passed on between cga files?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572343#M7745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is what is happening:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All attributes are evaluated &lt;EM&gt;before&lt;/EM&gt; the rule runs (same with constants). Your parent rule and child rules both have an attribute with the same name "lotArea", which causes the lotArea in the child rule to have the value of the parent rule lotArea. This all happens before the rule is run. So once your rule starts running, setting the lotArea in the rule, will not set the value in the child rule. That parent-child attribute matching only happens before the rule starts. Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change this in the parent rule:&lt;/P&gt;&lt;P&gt;attr lotArea = geometry.area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And remove this line:&lt;/P&gt;&lt;P&gt;set(lotArea, geometry.area)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also using the print command and having the CGA console open to see the results is extremely useful for debugging. Open the CGA console, and then make your parent rule start with this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lot --&amp;gt; &lt;/P&gt;&lt;P&gt;print("parent lotArea = " + lotArea)&lt;/P&gt;&lt;P&gt;print("child lotArea = " + f1.lotArea)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will see the initial value of the parent lotArea is handed down to the child rule, before any other CGA is run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Sep 2015 16:34:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572343#M7745</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-09-09T16:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can values be passed on between cga files?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572344#M7746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanxissimo! This means the world to me – or at least my simulation of it…&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although, I don't really understand what happens (which, of course, annoys me, as I won't be able to replicate the trick in another context).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How does the script know which geometry.area to use in attr lotArea? I use the geometry.area function in more places throughout the script. In addition, attr lotArea is no longer referenced anywhere in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, it seems that the parent attr does not simply overrule the namesake child attr. Rather it seems to work in conjunction with it: I cannot write whatever value for the child attr (this would be the case if it was overwritten, I suppose). It must be set to geometry.area like the parent attr in order to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Yes, the console is truly helpful when debugging.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 08:43:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572344#M7746</guid>
      <dc:creator>NicolaiSteinø</dc:creator>
      <dc:date>2015-09-10T08:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can values be passed on between cga files?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572345#M7747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set the lotArea attribute in the parent rule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attr lotArea = geometry.area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since all attrs evaluate before the rule executes, it uses the area of the starting geometry. The child also takes the same value for lotArea, regardless of its own geometry. Regardless of what the area is at any other time. This is what you wanted, yes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 12:31:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572345#M7747</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-09-10T12:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Can values be passed on between cga files?</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572346#M7748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With importing rules, all of the child attributes whose names match a parent attr will be set to the parent value before the start  rule begins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 12:37:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/can-values-be-passed-on-between-cga-files/m-p/572346#M7748</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2015-09-10T12:37:58Z</dc:date>
    </item>
  </channel>
</rss>

