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

Rename spaces with space type

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

PY gravatar image

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

Hello,

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.

Thanks,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

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

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

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 object.name in some cases you may need to use object.name.to_s. 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

Comments

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 gravatar imagePY ( 2017-05-04 08:00:28 -0600 )edit

Your Answer

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

Add Answer

 

Question Tools

Stats

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

Seen: 137 times

Last updated: May 02 '17