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

Assigning space types in sketchup

asked 2017-10-22 19:02:47 -0500

willyJohan's avatar

updated 2017-10-22 19:27:24 -0500

I'm trying to create a mechanism to easily assign space types to spaces. Seems the easiest way to do this would be to select a group of spaces within sketchup, run a measure/user script which has, as an input, a drop down list populated with all the space types available in the osm file. Whichever space type was selected from the list would then be assigned to the selected spaces.

All seems pretty straight forward, but I just want to verify a few things:

1) does something like this already exist?

2) I'm assuming this must be done in sketchup because it is the only way I can easily select specific spaces and apply a measure only to those spaces, is this the case? Am I missing a better approach?

3) Can user scripts have dynamic inputs, i.e. can i populate a drop down list based on the osm file objects available?

4) Which, if any, would be the best measures to cannibalize for this effort (I know next to nothing about any of this and need somewhere to start)

5) is there a guide to writing user scripts in sketch up? I'm having trouble getting new scripts to show up in the skecthup UI (I assume that all i have to do it put a script in "openstudio-2.3.0\SketchUpPlugin\openstudio\sketchup_plugin\user_scripts\Alter or Add Model Elements" but his does not seem to be working)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-10-23 06:28:48 -0500

TomB's avatar

1) Yes. The Apply Attributes to Selected Spaces button will let you assign a space type to all selected spaces.

2) Yes, Sketchup is the place for it.

3) Yes. There are lots of examples in OpenStudio measures, try the Predicted Mean Vote measure. It has a very tody example of populating a a dropdown selector with Schedule options. There is a few lines of code required to get a list of things and make them into a set of choices.

4) Start with an existing Sketchup User Script does anything to spaces or zones. You can explore the OpenStudio API through the Sketchup Ruby console. to get access to the model use model = Sketchup.active_model.model_interface.openstudio_model

5.1) Try this Measure Writing Guide. There's not that much too it.

5.2) You'll need to restart Sketchup to get a new script to show up initially. Once in there, There is a menu option to Reload User Scripts which will refresh changes.

edit flag offensive delete link more

Comments

I love it when there is a super obvious button that does exactly what I want. Thank you. Though on 5.2, i still don't seem to be able to get the new measures to load. is it possible it is linked to a different directory?

willyJohan's avatar willyJohan  ( 2017-10-23 11:45:36 -0500 )edit

Your Answer

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

Add Answer

Careers

Question Tools

Stats

Asked: 2017-10-22 19:02:47 -0500

Seen: 333 times

Last updated: Oct 23 '17