<?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 Attribute Reporting in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182574#M2455</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the example in this post work for you?&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/thread/194936-exporting-object-attributes-from-cityengine-to-scene-layer-package-problem?commentID=687983&amp;amp;et=watches.email.thread#comment-687138" title="https://community.esri.com/thread/194936-exporting-object-attributes-from-cityengine-to-scene-layer-package-problem?commentID=687983&amp;amp;et=watches.email.thread#comment-687138"&gt;https://community.esri.com/thread/194936-exporting-object-attributes-from-cityengine-to-scene-layer-package-problem?commentID=687983&amp;amp;et=watches.email.thread#comment-687138&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the rule attributes connected to object attributes?&amp;nbsp; (in Inspector, click on drop down arrow next to attribute -&amp;gt; Connect&amp;nbsp;attribute -&amp;gt; Object attribute)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Oct 2017 09:22:19 GMT</pubDate>
    <dc:creator>CherylLau</dc:creator>
    <dc:date>2017-10-25T09:22:19Z</dc:date>
    <item>
      <title>CityEngine Attribute Reporting</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182573#M2454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to export object attributes along with models in a scene package layer. After using the following rules (here,&amp;nbsp;attributes are simplified), I am still receiving a 'name' attribute associated with shape number (see attached snip) when the models are ingested and interacted with in a web scene (uploaded manually to our Portal for ArcGIS).&amp;nbsp; Any recommendations on how to get these attributes to export properly in the scene layer package? I am using CityEngine&amp;nbsp;&lt;SPAN&gt;Basic&lt;/SPAN&gt; 2017.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;/**
 * File:&amp;nbsp;&amp;nbsp;&amp;nbsp; reportAttr.cga
 * Created: 18 Oct 2017 21:50:40 GMT
 * Author:&amp;nbsp; GARDTESS
 */

version "2017.0"

attr BL_ID = ""
attr TYPE = ""

@StartRule&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Report --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; report("BL_ID", BL_ID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; report("TYPE", TYPE)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code I appended to the end of the rule I am using to generate the models:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;import Report : "rules/reportAttr.cga"

attr BL_ID = ""
attr TYPE = ""


@StartRule
Generate --&amp;gt;
 Report.Report‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/381311_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:18:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182573#M2454</guid>
      <dc:creator>TessOldemeyer</dc:creator>
      <dc:date>2021-12-11T09:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine Attribute Reporting</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182574#M2455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the example in this post work for you?&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/thread/194936-exporting-object-attributes-from-cityengine-to-scene-layer-package-problem?commentID=687983&amp;amp;et=watches.email.thread#comment-687138" title="https://community.esri.com/thread/194936-exporting-object-attributes-from-cityengine-to-scene-layer-package-problem?commentID=687983&amp;amp;et=watches.email.thread#comment-687138"&gt;https://community.esri.com/thread/194936-exporting-object-attributes-from-cityengine-to-scene-layer-package-problem?commentID=687983&amp;amp;et=watches.email.thread#comment-687138&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the rule attributes connected to object attributes?&amp;nbsp; (in Inspector, click on drop down arrow next to attribute -&amp;gt; Connect&amp;nbsp;attribute -&amp;gt; Object attribute)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Oct 2017 09:22:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182574#M2455</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2017-10-25T09:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine Attribute Reporting</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182575#M2456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I actually used that post example to write the report rule file. The rule attributes are connected to the object attributes. These attributes are showing up in the inspector in the Shapes tab under 'Report' after I apply the rule to generate the shapes. However,&amp;nbsp; after I export the generated models to the scene layer package, the attributes don't show up in the web scene from the uploaded scene layer package in Portal. If I import the scene layer package into Arc Pro, it loads correctly, but I also cannot view any attributes associated with it.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Oct 2017 02:56:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182575#M2456</guid>
      <dc:creator>TessOldemeyer</dc:creator>
      <dc:date>2017-10-26T02:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine Attribute Reporting</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182576#M2457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made an even simpler example for you, which works for me.&amp;nbsp; Does this work for you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Create a new scene&lt;/P&gt;&lt;P&gt;2) Draw two rectangles&lt;/P&gt;&lt;P&gt;3) Add an object attribute called type to both shapes and set one shape's value to "residential" and the other shape's value to "office". (Inspector -&amp;gt; Object Attributes)&lt;/P&gt;&lt;P&gt;4) Apply this rule to the shapes.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;attr type = ""

Lot --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extrude(10)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; report("Type", type)&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;5) Note that, in the Inspector, the rule attribute called 'type' is connected to the object attribute called 'type'.&amp;nbsp; If it is not connected, connect them.&amp;nbsp; Click on drop down arrow next to type -&amp;gt; Connect Attribute -&amp;gt; Object attribute.&amp;nbsp; Also note that the report Type appears in the Reports section of the Inspector with the correct value for each shape.&lt;/P&gt;&lt;P&gt;6) Select both shapes&lt;/P&gt;&lt;P&gt;7) File -&amp;gt; Export models -&amp;gt; Esri Scene Layer Package -&amp;gt; Make sure 'Emit Reports' is checked -&amp;gt; Next -&amp;gt; Feature Granularity = One Feature Per Shape -&amp;gt; Finish&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Right click on slpk file in models folder -&amp;gt; Share As -&amp;gt; Upload package to my ArcGIS Online or Portal account -&amp;gt; Share&lt;/P&gt;&lt;P&gt;9) In Navigator, click on second icon along the top to go to your account and see the slpk you just made.&amp;nbsp; Right click -&amp;gt; Open in browser.&amp;nbsp; Or, sign on to ArcGIS Online in your web browser and view your Content to see the slpk file you just made.&amp;nbsp; Select this file.&lt;/P&gt;&lt;P&gt;10) In the browser, in your ArcGIS Online account,&amp;nbsp;click on the slpk file -&amp;gt; Publish -&amp;gt; Open in Scene Viewer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Scene Viewer, when a building is selected, the type reported is also displayed in the popup window.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/382843_scene_viewer_pop_up_with_reported_attribute.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:18:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182576#M2457</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2021-12-11T09:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine Attribute Reporting</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182577#M2458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your help with this Cheryl. I was able to get the attributes to export correctly using&amp;nbsp;the methodology you have included here (i.e. naming attributes in the main rule file and reporting them within&amp;nbsp;a rule, in my case, the pre-existing starting rule). I have two additional questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) is there a way to change the pop-up window label in the Scene Viewer (it seems to default to a Shape number label)&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) I have been struggling with poor rendering quality in the Scene Viewer on our Portal. Colored faces appear patchy or as if there is face conflict. The white patchiness is dynamic and shifts as models are rotated in the scene viewer. The models render as solid color surfaces in CityEngine prior to exporting as a scene layer packages. Any tips on ways to have these colors stay solid when rendering in the SceneViewer? Attached are screenshots of this issue where colored faces are not rendering consistently. I posted this question here:&amp;nbsp;&lt;A href="https://community.esri.com/message/728604-face-rendering-in-scene-viewer"&gt;https://community.esri.com/message/728604-face-rendering-in-scene-viewer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="383389" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/383389_pastedImage_1.png" style="width: 620px; height: 291px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="383423" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/383423_pastedImage_2.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2017 16:54:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182577#M2458</guid>
      <dc:creator>TessOldemeyer</dc:creator>
      <dc:date>2017-11-13T16:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine Attribute Reporting</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182578#M2459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm glad you were able to get it to work with the simple example.&amp;nbsp; Once you have a simple example working, you could add more complexity a little at a time, and then hopefully, you'll be able to figure out at which step things stopped working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Yes, you can change the name of the shape by reporting to a report called "name":&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;report("name", "MyNewNameToBeDisplayedInPopupWindow")‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) See your other post:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/message/728604-face-rendering-in-scene-viewer#comment-728885" title="https://community.esri.com/message/728604-face-rendering-in-scene-viewer#comment-728885"&gt;https://community.esri.com/message/728604-face-rendering-in-scene-viewer#comment-728885&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2017 11:10:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182578#M2459</guid>
      <dc:creator>CherylLau</dc:creator>
      <dc:date>2017-11-14T11:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: CityEngine Attribute Reporting</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182579#M2460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome! This works perfectly:&amp;nbsp;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;report("name", "MyNewNameToBeDisplayedInPopupWindow")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2017 23:22:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cityengine-attribute-reporting/m-p/182579#M2460</guid>
      <dc:creator>TessOldemeyer</dc:creator>
      <dc:date>2017-11-15T23:22:55Z</dc:date>
    </item>
  </channel>
</rss>

