<?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: fileSearch &amp;amp; fileRandom Limitations in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/filesearch-amp-filerandom-limitations/m-p/1045791#M10146</link>
    <description>&lt;P&gt;It is incredible how much of rule design is just filename management.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Apr 2021 23:29:12 GMT</pubDate>
    <dc:creator>DavidWasserman</dc:creator>
    <dc:date>2021-04-11T23:29:12Z</dc:date>
    <item>
      <title>fileSearch &amp; fileRandom Limitations</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/filesearch-amp-filerandom-limitations/m-p/1036807#M10127</link>
      <description>&lt;P&gt;I discovered today that fileSearch and fileRandom will not return a result if there is a space in the path.&lt;/P&gt;&lt;P&gt;For example print(fileRandom(/Project Name/*.*)) will not work but print(fileRandom(/DifferentProjectName/*.*)) does. I renamed my project but it broke a ton of references in other places. Is there a way to get around this limitation? &amp;amp;nbsp; or chr(32)...something like that?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 19:28:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/filesearch-amp-filerandom-limitations/m-p/1036807#M10127</guid>
      <dc:creator>DevinLavigne</dc:creator>
      <dc:date>2021-03-15T19:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: fileSearch &amp; fileRandom Limitations</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/filesearch-amp-filerandom-limitations/m-p/1045791#M10146</link>
      <description>&lt;P&gt;It is incredible how much of rule design is just filename management.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Apr 2021 23:29:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/filesearch-amp-filerandom-limitations/m-p/1045791#M10146</guid>
      <dc:creator>DavidWasserman</dc:creator>
      <dc:date>2021-04-11T23:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: fileSearch &amp; fileRandom Limitations</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/filesearch-amp-filerandom-limitations/m-p/1062436#M10163</link>
      <description>&lt;P&gt;This is actually not a bug.&amp;nbsp; Whitespace inside the &lt;FONT face="courier new,courier"&gt;searchQuery&lt;/FONT&gt; string in &lt;FONT face="courier new,courier"&gt;fileSearch&lt;/FONT&gt;/&lt;FONT face="courier new,courier"&gt;filesSearch&lt;/FONT&gt; indicates AND in the query.&amp;nbsp; Using whitespace, two or more queries can be AND-ed.&amp;nbsp; See the last example in the doc.&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/cityengine/latest/cga/cga-file-search-function.htm" target="_blank" rel="noopener"&gt;https://doc.arcgis.com/en/cityengine/latest/cga/cga-file-search-function.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The same applies to other functions which use &lt;FONT face="courier new,courier"&gt;fileSearch&lt;/FONT&gt;:&amp;nbsp; &lt;FONT face="courier new,courier"&gt;assetApproxRatio&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;assetApproxSize&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;assetBestRatio&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;assetBestSize&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;assetFitSize&lt;/FONT&gt;,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;fileRandom&lt;/FONT&gt;,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;imageApproxRatio&lt;/FONT&gt;,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;imageBestRatio&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In order to put whitespace into a filepath, use single quotes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;filesSearch("'Wall Textures/*.png'")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, the escape characters &lt;FONT face="courier new,courier"&gt;\s&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;\x20&lt;/FONT&gt; also work to replace a space.&amp;nbsp; Note that an extra backslash is needed so the cga compiler interprets it correctly (instead of as a normal backslash).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;filesSearch("Wall\\sTextures/*.png")
filesSearch("Wall\\x20Textures/*.png")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 16:24:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/filesearch-amp-filerandom-limitations/m-p/1062436#M10163</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2021-06-16T16:24:24Z</dc:date>
    </item>
  </channel>
</rss>

