<?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: cityengine  building height color in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-building-height-color/m-p/23763#M310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here a sample for you, using colors by attribute.&amp;nbsp;&lt;/P&gt;&lt;P&gt;CGA from:&amp;nbsp;Tutorial_16_Urban_Planning__2016_1\rules\Context.cga&lt;/P&gt;&lt;P&gt;__________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;version "2014.1"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;attr floors = 0&lt;BR /&gt;attr floorDelta = rint(rand(-1,1))&lt;BR /&gt;const floorheight = 3&lt;/P&gt;&lt;P&gt;@Range("Assembly","Agricultural","Educational","Industry","Mercantile","Office","Public","Residential","Service","Storage","Transport","Utility","Other","Unknown")&lt;BR /&gt;attr usage = "Residential"&lt;/P&gt;&lt;P&gt;buildingUsageColor (buildingUsage) =&lt;BR /&gt; case buildingUsage == "Assembly" : "#f8c283"&lt;BR /&gt; case buildingUsage == "Agricultural" : "#cccc00"&lt;BR /&gt; case buildingUsage == "Educational" : "#ad89ba"&lt;BR /&gt; case buildingUsage == "Industry" : "#7a85c8"&lt;BR /&gt; case buildingUsage == "Mercantile" : "#777777"&lt;BR /&gt; case buildingUsage == "Office" : "#B884D5"&lt;BR /&gt; case buildingUsage == "Public" : "#BCD4D5"&lt;BR /&gt; case buildingUsage == "Residential" : "#bb4646"&lt;BR /&gt; case buildingUsage == "Service" : "#d08c6e"&lt;BR /&gt; case buildingUsage == "Storage" : "#444444"&lt;BR /&gt; case buildingUsage == "Transport" : "#444444"&lt;BR /&gt; case buildingUsage == "Utility" : "#444444"&lt;BR /&gt; case buildingUsage == "Other" : "#444444"&lt;BR /&gt; case buildingUsage == "Unknown" : "#444444"&lt;BR /&gt; else /*error*/ : "#ffffff"&lt;/P&gt;&lt;P&gt;@Startrule&lt;BR /&gt;Context --&amp;gt;&lt;BR /&gt; extrude((floors + floorDelta)*floorheight)&lt;BR /&gt; color(buildingUsageColor(usage))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Jul 2019 10:35:13 GMT</pubDate>
    <dc:creator>Luiz_AmadeuCoutinho</dc:creator>
    <dc:date>2019-07-30T10:35:13Z</dc:date>
    <item>
      <title>cityengine  building height color</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-building-height-color/m-p/23762#M309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;nice to meet you ~&lt;/P&gt;&lt;P&gt;i need some help ~&lt;/P&gt;&lt;P&gt;nmly is shp builing height attribute&lt;/P&gt;&lt;P&gt;i made this&amp;nbsp; grammer&lt;/P&gt;&lt;P&gt;with height attr , i would like to assign&amp;nbsp;&amp;nbsp; color&lt;/P&gt;&lt;P&gt;but this code is error&lt;/P&gt;&lt;P&gt;what problem ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;attr NMLY = 0&amp;nbsp; &lt;/P&gt;&lt;P&gt;zoneColor =&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case NMLY == "1" :&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "#ff0000"&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; case NMLY == "2" :&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "#00ff00"&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "#0000ff"&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@StartRule&lt;BR /&gt;Lot --&amp;gt; &lt;BR /&gt;&amp;nbsp; extrude(NMLY) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; color (zoneColor)&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 08:39:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-building-height-color/m-p/23762#M309</guid>
      <dc:creator>chojeo</dc:creator>
      <dc:date>2019-07-30T08:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: cityengine  building height color</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-building-height-color/m-p/23763#M310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here a sample for you, using colors by attribute.&amp;nbsp;&lt;/P&gt;&lt;P&gt;CGA from:&amp;nbsp;Tutorial_16_Urban_Planning__2016_1\rules\Context.cga&lt;/P&gt;&lt;P&gt;__________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;version "2014.1"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;attr floors = 0&lt;BR /&gt;attr floorDelta = rint(rand(-1,1))&lt;BR /&gt;const floorheight = 3&lt;/P&gt;&lt;P&gt;@Range("Assembly","Agricultural","Educational","Industry","Mercantile","Office","Public","Residential","Service","Storage","Transport","Utility","Other","Unknown")&lt;BR /&gt;attr usage = "Residential"&lt;/P&gt;&lt;P&gt;buildingUsageColor (buildingUsage) =&lt;BR /&gt; case buildingUsage == "Assembly" : "#f8c283"&lt;BR /&gt; case buildingUsage == "Agricultural" : "#cccc00"&lt;BR /&gt; case buildingUsage == "Educational" : "#ad89ba"&lt;BR /&gt; case buildingUsage == "Industry" : "#7a85c8"&lt;BR /&gt; case buildingUsage == "Mercantile" : "#777777"&lt;BR /&gt; case buildingUsage == "Office" : "#B884D5"&lt;BR /&gt; case buildingUsage == "Public" : "#BCD4D5"&lt;BR /&gt; case buildingUsage == "Residential" : "#bb4646"&lt;BR /&gt; case buildingUsage == "Service" : "#d08c6e"&lt;BR /&gt; case buildingUsage == "Storage" : "#444444"&lt;BR /&gt; case buildingUsage == "Transport" : "#444444"&lt;BR /&gt; case buildingUsage == "Utility" : "#444444"&lt;BR /&gt; case buildingUsage == "Other" : "#444444"&lt;BR /&gt; case buildingUsage == "Unknown" : "#444444"&lt;BR /&gt; else /*error*/ : "#ffffff"&lt;/P&gt;&lt;P&gt;@Startrule&lt;BR /&gt;Context --&amp;gt;&lt;BR /&gt; extrude((floors + floorDelta)*floorheight)&lt;BR /&gt; color(buildingUsageColor(usage))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 10:35:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-building-height-color/m-p/23763#M310</guid>
      <dc:creator>Luiz_AmadeuCoutinho</dc:creator>
      <dc:date>2019-07-30T10:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: cityengine  building height color</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-building-height-color/m-p/23764#M311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the case statement, NMLY is being compared to a string "1", but NMLY is a float.&amp;nbsp; Take away the quotation marks around "1" and "2", and do the logical comparison to floats 1 and 2 like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;attr NMLY = 0 

zoneColor =              
    case NMLY == 1 :  
        "#ff0000"  
    case NMLY == 2 :  
        "#00ff00"  
    else:  
        "#0000ff"  
&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:57:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-building-height-color/m-p/23764#M311</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2021-12-10T20:57:57Z</dc:date>
    </item>
  </channel>
</rss>

