<?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 CGA Rules, Attributes -unavailable in ArcGIS CityEngine Questions</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rules-attributes-unavailable/m-p/162294#M2148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good morning,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on a simple rule and I would like to use the attributes from the .gdb file, some of them work and some are gray out[ATTACH=CONFIG]28438[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here is the rule (I am not a programmer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;attr height = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attr species = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attr diameter = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lot--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; s(diameter/2,height,diameter/2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; i("Tree.obj")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The "species" attr get transferred to the attributes, but "diameter" and "height" don't&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to shape the .obj file base on the attributes &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lukasz&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Oct 2013 11:36:51 GMT</pubDate>
    <dc:creator>LukeCzar</dc:creator>
    <dc:date>2013-10-18T11:36:51Z</dc:date>
    <item>
      <title>CGA Rules, Attributes -unavailable</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rules-attributes-unavailable/m-p/162294#M2148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good morning,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on a simple rule and I would like to use the attributes from the .gdb file, some of them work and some are gray out[ATTACH=CONFIG]28438[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here is the rule (I am not a programmer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;attr height = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attr species = ""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;attr diameter = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lot--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; s(diameter/2,height,diameter/2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; i("Tree.obj")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The "species" attr get transferred to the attributes, but "diameter" and "height" don't&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to shape the .obj file base on the attributes &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lukasz&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Oct 2013 11:36:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rules-attributes-unavailable/m-p/162294#M2148</guid>
      <dc:creator>LukeCzar</dc:creator>
      <dc:date>2013-10-18T11:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: CGA Rules, Attributes -unavailable</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rules-attributes-unavailable/m-p/162295#M2149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;possibly, the attrs are of the wrong type. E.g. the string "5" is not the same as the float 5.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try casting the types, this may help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if the value is actually string in the object attrs, initialize the attr as empty string, then cast the value with float()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
attr stringValue = "" # connect to object attr.
@Hidden
attr floatValue = 0


Lot --&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; set(floatValue, float(stringValue))
&amp;nbsp;&amp;nbsp;&amp;nbsp; Continue.
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Though this is just a theory. let me know, ok ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;matt&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:31:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-questions/cga-rules-attributes-unavailable/m-p/162295#M2149</guid>
      <dc:creator>MatthiasBuehler1</dc:creator>
      <dc:date>2021-12-11T08:31:17Z</dc:date>
    </item>
  </channel>
</rss>

