<?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: Selecting Random OBJ from assets folder  in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-random-obj-from-assets-folder/m-p/557215#M7523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kenneth, that solved the problem! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2016 08:07:02 GMT</pubDate>
    <dc:creator>KristianMortensen1</dc:creator>
    <dc:date>2016-08-31T08:07:02Z</dc:date>
    <item>
      <title>Selecting Random OBJ from assets folder</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-random-obj-from-assets-folder/m-p/557213#M7521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I'm&amp;nbsp;new to city engine and is trying to write a cga&amp;nbsp;rule file which will import one of 14 sketchup&amp;nbsp;models (parking towers) onto a lot.&amp;nbsp;I have imported &amp;nbsp;the models into the asset folder as OBJ files and then use this piece of code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Street --&amp;gt; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i(listRandom(fileSearch("Towers/Tower_*.obj"))) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s(8.5,12.17,5.59) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rotate(abs, world, 0, 90, 0) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;center(xz) #ParkingTower&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which works, now comes the problem, when I add the rulefile to more that one piece of "shape" and update&amp;nbsp;Seed it chooses&amp;nbsp;the same model at all the shapes which are not what I wanted, I wanted 14 shapes ~ 14 different towers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/218588_Random generating building.JPG" style="width: 620px; height: 327px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can update each segment of the road, which will give me a new building on that segment, but if I update it 3 times and then update another segment 3 times it will generate the same building, so it seems that it is not random at all&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&amp;nbsp;Does anybody have any advice on&amp;nbsp;how I can make it chose a truly random obj?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 11:19:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-random-obj-from-assets-folder/m-p/557213#M7521</guid>
      <dc:creator>KristianMortensen1</dc:creator>
      <dc:date>2016-08-30T11:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting Random OBJ from assets folder</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-random-obj-from-assets-folder/m-p/557214#M7522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand you correctly…&lt;/P&gt;&lt;P&gt;I would do it like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt; background: white;"&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;Street --&amp;gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i(fileRandom("Towers/Tower_*.obj"))&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;s(8.5,12.17,5.59)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;rotate(abs, world, 0, 90, 0)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;center(xz) #ParkingTower&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 13:39:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-random-obj-from-assets-folder/m-p/557214#M7522</guid>
      <dc:creator>KennethLindhardt</dc:creator>
      <dc:date>2016-08-30T13:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting Random OBJ from assets folder</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-random-obj-from-assets-folder/m-p/557215#M7523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Kenneth, that solved the problem! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 08:07:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/selecting-random-obj-from-assets-folder/m-p/557215#M7523</guid>
      <dc:creator>KristianMortensen1</dc:creator>
      <dc:date>2016-08-31T08:07:02Z</dc:date>
    </item>
  </channel>
</rss>

