Synopsis
- report (key, value)
Parameters
- key—stringA string which defines a key for a report collection. Keys can be grouped with the name separator ''.''
- value—{ float | bool | string }Value (or variable / shape attribute) to add to the collection.
Description
The report operation permits collection of arbitrary data during model generation. The operation takes two parameters: a key of type string and a value of any type. The key and value type define a collection to which the value is added on every invocation. After generation, the collections are assessed statistically and displayed in the Reports shelf in the Inspector.
Reports can be manually exported from the Inspector via the copy-paste clipboard (select the rows you want to export with Shift and the cursor keys, press Ctrl+ C and paste the data to a text editor or a spreadsheet). Python scripting provides another, more powerful way to export the reports; scripting allows for accessing all values in the collections, see Script Based Exporter. To view the full Python reference, click Help > Offline Python Reference in the CityEngine main menu.
Examples
Reporting Window State
The CGA rules produce the model to the left and the report shown below.
| ![]() |
![Generated report Generated report](GUID-18A2411D-2889-406E-B993-7A95210F6007-web.png)