<?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 Referencing different styles from within the same CGA file in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291713#M4009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to reference different styles within a cga script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Say you want to render different facade styles (or other characteristics defined by styles) based on a constraint map reference. How do you do that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, I want to control the amount of new buildings to replace historical buildings in an urban regeneration area by means of a gray scale map indicating the redevelopment ratios for different parts of the area. I have defined old and new building types with different names within one cga file (quite a hassle and not very clean) but I would like to simplify my script (and my work) by using styles. Only, I can't figure out a way to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you help?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nicolai&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jan 2013 11:17:55 GMT</pubDate>
    <dc:creator>NicolaiSteinø</dc:creator>
    <dc:date>2013-01-30T11:17:55Z</dc:date>
    <item>
      <title>Referencing different styles from within the same CGA file</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291713#M4009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to reference different styles within a cga script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Say you want to render different facade styles (or other characteristics defined by styles) based on a constraint map reference. How do you do that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, I want to control the amount of new buildings to replace historical buildings in an urban regeneration area by means of a gray scale map indicating the redevelopment ratios for different parts of the area. I have defined old and new building types with different names within one cga file (quite a hassle and not very clean) but I would like to simplify my script (and my work) by using styles. Only, I can't figure out a way to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you help?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nicolai&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 11:17:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291713#M4009</guid>
      <dc:creator>NicolaiSteinø</dc:creator>
      <dc:date>2013-01-30T11:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing different styles from within the same CGA file</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291714#M4010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Calling or referencing styles is currently not possible. If you find out how it works .. Let me know .. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So atm, you best map the 'building style' with a map and then define each attr value by a function, e.g. anything in this direction :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;myValues(key) =
&amp;nbsp;&amp;nbsp;&amp;nbsp; case myMappedStyle == "residential" :
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case key == "height" : 6
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case key == "facade texture" : "res_1.jpg"
..&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:03:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291714#M4010</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2021-12-11T14:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing different styles from within the same CGA file</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291715#M4011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm afraid maps won't do it for me, as my criteria are not necessarily geo specific. But I'll try to think of another approach then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Styles just seem so neat�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nic&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Feb 2013 10:03:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291715#M4011</guid>
      <dc:creator>NicolaiSteinø</dc:creator>
      <dc:date>2013-02-03T10:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing different styles from within the same CGA file</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291716#M4012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Note that instead of sampling from images ( maps ), you can also sample object attributes from geometries on other layers !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;E.g. if you have polygonal shapes with 'zones' defined as attrs, you can define their layer mapping, then sample for those values from shapes on other layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Feb 2013 13:23:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291716#M4012</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2013-02-03T13:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Referencing different styles from within the same CGA file</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291717#M4013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Rather than keeping building types in a single cga file, it might be easier to split them into separate files and import the cga file for the appropriate building type into a master.cga. The imported building type cga file can be selected conditionally, based on the value from raster constraint map layer. It will keep the code a bit neater and make it more expandable (for more building types.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working on a similar problem (though hadn't considered using styles); you may find the discussions in this &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/76619-import-statement-functions"&gt;thread&lt;/A&gt;&lt;SPAN&gt; informative.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 22:44:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/referencing-different-styles-from-within-the-same/m-p/291717#M4013</guid>
      <dc:creator>ChristianGass1</dc:creator>
      <dc:date>2013-02-06T22:44:20Z</dc:date>
    </item>
  </channel>
</rss>

