Your First Python Script
The anatomy of a Python script
from model_editor import Editor
# get access to editor contents
editor = Editor()
# add your logic here
for room in editor.model.room_2ds:
room.display_name = f'{room.parent.display_name}_{room.display_name}'
# update the model inside the editor
editor.update()Your first script
Access the model
Rename the rooms
Update the model

Debugging your code

Last updated
Was this helpful?

