<?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: python scripting selection help! in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/python-scripting-selection-help/m-p/94405#M1302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Untested, but this should get you pretty close:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;layerName = "yourLayerName"
shapeRule = "rules/yourRule.cga"

if __name__ == '__main__':

&amp;nbsp;&amp;nbsp;&amp;nbsp; layer = ce.getObjectsFrom(ce.scene, ce.isLayer, ce.withName(layerName))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for x in layer:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shapes = ce.getObjectsFrom(x)&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;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for shape in shapes:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ce.setRuleFile(shape, shapeRule)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ce.setStartRule(shape, 'Lot')&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:36:40 GMT</pubDate>
    <dc:creator>LR</dc:creator>
    <dc:date>2021-12-10T23:36:40Z</dc:date>
    <item>
      <title>python scripting selection help!</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/python-scripting-selection-help/m-p/94404#M1301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;How do i select only the lots from the imported openstreetmap and assign a rule file to that and how to i select only the street network(roads that is) and assign another rule file to that using only python scripting? Im new to scipting, so if someone could do a small writeup of this code, it would be useful.&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 19:14:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/python-scripting-selection-help/m-p/94404#M1301</guid>
      <dc:creator>SandeshIyer</dc:creator>
      <dc:date>2016-08-10T19:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: python scripting selection help!</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/python-scripting-selection-help/m-p/94405#M1302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Untested, but this should get you pretty close:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;layerName = "yourLayerName"
shapeRule = "rules/yourRule.cga"

if __name__ == '__main__':

&amp;nbsp;&amp;nbsp;&amp;nbsp; layer = ce.getObjectsFrom(ce.scene, ce.isLayer, ce.withName(layerName))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for x in layer:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shapes = ce.getObjectsFrom(x)&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;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for shape in shapes:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ce.setRuleFile(shape, shapeRule)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ce.setStartRule(shape, 'Lot')&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:36:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/python-scripting-selection-help/m-p/94405#M1302</guid>
      <dc:creator>LR</dc:creator>
      <dc:date>2021-12-10T23:36:40Z</dc:date>
    </item>
  </channel>
</rss>

