<?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: Extrude a block with python in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/extrude-a-block-with-python/m-p/1012827#M10081</link>
    <description>&lt;P&gt;I see the confusion. There is a distinction between CGA &amp;amp; Python in CityEngine. CityEngine I think still uses the Jython API for workflow automation and set up. You have the right idea here. The issue you are having is you need to apply a rule written in CGA to build geometries from lots. I recommend looking at sample rules for this in the tutorials.&amp;nbsp;&lt;BR /&gt;This &lt;A href="https://github.com/d-wasserman/Complete_Street_Rule/blob/master/scripts/Generate_Altered_Streets.py" target="_self"&gt;script&lt;/A&gt; contains an example used to create different street combinations based on provided attributes as an example. It is based on attributes of the Complete Street Rule.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Dec 2020 06:14:19 GMT</pubDate>
    <dc:creator>DavidWasserman</dc:creator>
    <dc:date>2020-12-30T06:14:19Z</dc:date>
    <item>
      <title>Extrude a block with python</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/extrude-a-block-with-python/m-p/1007585#M10069</link>
      <description>&lt;P&gt;I am working on a project that uses python to generate road networks, which by enclosing spaces automatically creates lots with blocks inside. I am able to set an attribute to the block, but I can't find how to extrude the block or set a height attribute to make it a building.&lt;/P&gt;&lt;P&gt;For example, I can set a height attribute, and when I click after the script runs it shows that height (based on the "Animation" script tutorial&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/cityengine/2019.0/tutorials/tutorial-10-python-scripting.htm" target="_blank" rel="noopener"&gt;https://doc.arcgis.com/en/cityengine/2019.0/tutorials/tutorial-10-python-scripting.htm&lt;/A&gt;)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def set_building(ce):
    lots = ce.getObjectsFrom(ce.scene, ce.withName("*Block*"))
    ce.setSelection (lots)
    print(ce.selection())
    
    for blocks in lots:
        ce.setAttributeSource(blocks, "height", "OBJECT")
        ce.setAttribute(blocks, "height", 10)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However this does nothing to the model. I see that CGA reference has an 'extrude' method, but the python reference is missing it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is this done?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 01:04:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/extrude-a-block-with-python/m-p/1007585#M10069</guid>
      <dc:creator>cadop</dc:creator>
      <dc:date>2020-12-08T01:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extrude a block with python</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/extrude-a-block-with-python/m-p/1012827#M10081</link>
      <description>&lt;P&gt;I see the confusion. There is a distinction between CGA &amp;amp; Python in CityEngine. CityEngine I think still uses the Jython API for workflow automation and set up. You have the right idea here. The issue you are having is you need to apply a rule written in CGA to build geometries from lots. I recommend looking at sample rules for this in the tutorials.&amp;nbsp;&lt;BR /&gt;This &lt;A href="https://github.com/d-wasserman/Complete_Street_Rule/blob/master/scripts/Generate_Altered_Streets.py" target="_self"&gt;script&lt;/A&gt; contains an example used to create different street combinations based on provided attributes as an example. It is based on attributes of the Complete Street Rule.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2020 06:14:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/extrude-a-block-with-python/m-p/1012827#M10081</guid>
      <dc:creator>DavidWasserman</dc:creator>
      <dc:date>2020-12-30T06:14:19Z</dc:date>
    </item>
  </channel>
</rss>

