Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Rename spaces with space type

asked 2017-05-02 09:29:37 -0500

PY's avatar

updated 2017-05-02 09:58:27 -0500


Is there a way to rename several spaces in Sketchup/OS ? Maybe by assigning the space type and a number or adding a character at the beginning of the space name automatically ?

In my model, I want to know which spaces are apartments or corridors only with their names, but it would take time to do that one by one.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-02 13:51:33 -0500

updated 2017-05-02 13:54:02 -0500

Seems related to this post about mapping space names to plan for the purpose of re-naming, but not exactly the same question.

There is a user script in the SketchUp Plugin called Rename ThermalZones Based on Space Names. this also exists as a measure for use outside of app, along with another measure to Rename Space Surfaces Based on Parent Space and Orientation

The user script in the SketchUp plugin has code that does thermal_zones.each do where thermal_zone = model.getThermalZones. You could change that to model.getSpaceTypes.each do |space_type| and then loop through spaces with space_type.spaces.each do |space|. Then you could use any logic you want to rename the individual spaces.

You can get an objects name with in some cases you may need to use Then to set the name of the object use object.setName("My New Space Name").

I would recommend using a measure vs. just a SketchUp user script, but either will work.

edit flag offensive delete link more


Thank you for your answer. I tried to make the change yesterday in Rename ThermalZones Based on Space Names. However, my knowledge in measures is not sufficient enough to make it works. Can you explain me more precisely what to do ? Thanks,

PY's avatar PY  ( 2017-05-04 08:00:28 -0500 )edit

Hi David, Is there anyway to create space type name based on space name ? Thank you

Brianna's avatar Brianna  ( 2021-03-24 15:32:52 -0500 )edit

@Brianna, yes it would be something like space.spaceType.get.setName(, but assuming space types are used for many spaces, you have to decide how to handle that. My code example doesn't check if the space has a space type assigned, which should be added if you use it.

David Goldwasser's avatar David Goldwasser  ( 2021-03-24 23:06:30 -0500 )edit

Thank you David

Brianna's avatar Brianna  ( 2021-03-25 10:26:44 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops


Question Tools


Asked: 2017-05-02 09:29:37 -0500

Seen: 299 times

Last updated: May 02 '17