I have a shapefile with buildings and imported it into CityEngine. All the objects in CityEngine get named automatically. Is there a way to change to generate custom object names from a value in the object attributes table (with a rule file) ?
Pls find attached a python module that should solve your problem.
Copy the .py file into the script folder of your project.
In order to make it work you need to replace "myAttr" with the attributes name you want to use. Save it afterwards.
Select the shapes you want to rename only.
With the python script open in the editor go to Python -> Run
the selected shapes should now be renamed.
Note: this script is intended to work exactly for this case. it doesn't handle edge cases such as attribute does not exist, etc.