How to combine attributes in ArcGIS Pro and CityEngine

197
1
01-24-2019 01:54 PM
T_LeyaWalker
New Contributor

My team is working on building the footprints for a college campus and had a few questions regarding using a coding source to create rules for our data in CityEngine. We figured out how to extrude each building at it's "mean" height from our GIS data and we have over 100 buildings in which we created a rule attribute (Rule2_face) in ArcGIS Pro but need help incorporating the attribute with each building in a script form. We found a few examples we can refer but not quite helpful for the beginner stage.

extrude at mean height:

/**
 * File:    rule.cga
 * Created: 9 Jan 2019 17:40:15 GMT
 * Author:  martinmc
 */
version "2018.0"
attr ZonalSt_campus_1_MAX = 0
attr buildhei_5 = 0
Lot--> 
extrude (ZonalSt_campus_1_MAX)
extrude (buildhei_5)
0 Kudos
1 Reply
CherylLau
Esri Regular Contributor

First, export your shapes from Pro so that when they are imported into CityEngine, the shapes have object attributes for the data shown in your table.

Then, you can create a rule attribute called Rule2_face similar to how you created one for buildhei_5.

attr rule2_face = 0

Since the rule attribute has the same name, it will automatically connect to the object attribute with the same name when you assign the rule file to the shape.  You can also manually connect the rule attribute to the object attribute by clicking on the drop down arrow next to the attribute in the Inspector and selecting Connect Attribute.  The rule attribute has to have the same name as the object attribute.

Mapping Attributes with Connection Editor 

0 Kudos