<?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 - Rule File Unexpected Token in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-rule-file-unexpected-token/m-p/1026823#M10105</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/195851"&gt;@ÓrlaHammond&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think CityEngine uses the decimals in text strings to find file paths.&amp;nbsp; &amp;nbsp;You might do a quick find/replace of "Lot1.5" to "LotB" and see if that solve your problems.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;import Complete_Streets &amp;lt;file path&amp;gt;&lt;/P&gt;&lt;P&gt;call the rule:&amp;nbsp; &amp;nbsp;Complete_Streets.Sidewalks&amp;nbsp; &amp;nbsp; &amp;nbsp;or Complete_Streets.Streets&lt;/P&gt;</description>
    <pubDate>Mon, 15 Feb 2021 12:09:28 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-02-15T12:09:28Z</dc:date>
    <item>
      <title>CityEngine - Rule File Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-rule-file-unexpected-token/m-p/1026736#M10104</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm having a problem with a rule file I inherited. The original rule file was written for CityEngine 2016. I would like to update it so it runs in CityEngine 2020.&lt;/P&gt;&lt;P&gt;I am getting a recurring error: Unexpected token. This error is repeated throughout the code wherever there is a decimal value.&lt;/P&gt;&lt;P&gt;A snippet of the code throwing the error is below and I have attached a screenshot of the errors.&lt;/P&gt;&lt;P&gt;Any and all help is appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Lot1 --&amp;gt;
	#Where there is no commercial in the suburb and the % of residential buildings is &amp;gt;0
	case NoCommercialInSuburb == "No Commercial" &amp;amp;&amp;amp; PercentBuildingsResid &amp;gt; 0 :
		set(Ground_Floor_Resid, "GroundFloorResid")
		set(First_Floor_Resid, "FirstFloorResid")
		set(PercentUpperFloorResid, 1)
	    Lot1.5
	    
# Default method of allocating floorspace between residential and non-residential is to do so by floor. 
# This code below checks the ResidAllocationMethod parameter and switches the allocation method to building by building instead.
	case ResidAllocationMethod == "By building" &amp;amp;&amp;amp; (FixedRandomNumber/100) &amp;lt;= PercentBuildingsResid :
		set(Ground_Floor_Resid, "GroundFloorResid")
		set(First_Floor_Resid, "FirstFloorResid")
		set(PercentUpperFloorResid, 1)
		Lot1.5	

	case ResidAllocationMethod == "By building" &amp;amp;&amp;amp; (FixedRandomNumber/100) &amp;gt; PercentBuildingsResid :
		set(Ground_Floor_Resid, "GroundFloorNonResid")
		set(First_Floor_Resid, "FirstFloorNonResid")
		set(PercentUpperFloorResid, 0)
	   Lot1.5	
		
	else :
		Lot1.5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 00:01:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-rule-file-unexpected-token/m-p/1026736#M10104</guid>
      <dc:creator>ÓrlaHammond</dc:creator>
      <dc:date>2021-02-15T00:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine - Rule File Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-rule-file-unexpected-token/m-p/1026823#M10105</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/195851"&gt;@ÓrlaHammond&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think CityEngine uses the decimals in text strings to find file paths.&amp;nbsp; &amp;nbsp;You might do a quick find/replace of "Lot1.5" to "LotB" and see if that solve your problems.&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;import Complete_Streets &amp;lt;file path&amp;gt;&lt;/P&gt;&lt;P&gt;call the rule:&amp;nbsp; &amp;nbsp;Complete_Streets.Sidewalks&amp;nbsp; &amp;nbsp; &amp;nbsp;or Complete_Streets.Streets&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 12:09:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-rule-file-unexpected-token/m-p/1026823#M10105</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-15T12:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine - Rule File Unexpected Token</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-rule-file-unexpected-token/m-p/1026943#M10106</link>
      <description>&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;That seems to have solved my problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2021 19:33:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-rule-file-unexpected-token/m-p/1026943#M10106</guid>
      <dc:creator>ÓrlaHammond</dc:creator>
      <dc:date>2021-02-15T19:33:40Z</dc:date>
    </item>
  </channel>
</rss>

