I am using the open source "complete street" rule file. I have defined and modified some street attributes such as speed. How can I read the speed of each street from the generated model, via Python API?
Can't test ATM, but this should work on a selected shape:
ce.getAttribute(ce.selection()[0], '/ce/rule/myAttribute')
Hello Mohsen Nazemi,
This is a quite common question. It is not possible to directly read out the rule-defined attributes.
Please also refer the following GeoNet thread:
Is it possible to read rule-defined attributes with Python?
However there are indirect methods, like exporting a report to get the values.
Tutorial 12: Scripted report export—CityEngine Tutorials | ArcGIS for Desktop