Select to view content in your preferred language

How to change object name

823
3
12-13-2022 01:08 AM
hoya
by
Emerging Contributor

I want to collectively change the names of "Shape" displayed in blue to "52SBB3789".

morai_0-1670922168872.png

 

 

0 Kudos
3 Replies
ThomasFuchs
Esri Regular Contributor

Hello @hoya 

Thanks for your question. The simplest solution is to select the shapes you want to rename, then set the new name in the Inspector. The name change gets applied to all shapes in the selection.
2022-12-13 11_41_34-multiRename.png

0 Kudos
hoya
by
Emerging Contributor

First of all thank you so much for your reply. However, I have many SHP files of this type in the folder, and after calling them sequentially, I am curious about how to change the name after accessing "inspector" with a script.

0 Kudos
ThomasFuchs
Esri Regular Contributor

This is how to rename shapes with Python: 
Python scripting interface usage—ArcGIS CityEngine Resources | Documentation

namePattern = "'Shape*'"
newName     = "newName"
    
shapes = ce.getObjectsFrom(ce.scene,ce.isShape,ce.withName(namePattern))
ce.setName(shapes, newName)

 

0 Kudos