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

How to access openstudio model via Sketchup 2021 ruby console?

asked 2022-02-17 00:18:05 -0600

TomB's avatar

updated 2022-02-17 08:27:23 -0600

whereas in Sketchup 2017

model = Sketchup.active_model.model_interface.openstudio_model

in Sketchp 2021, the above returns an error message saying something like 'no such thing as .model_interface'.

I guess the Sketchup SDK changed.

Whats the new magic words to get to the openstudio model?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-02-17 20:29:01 -0600

Try OpenStudio::Plugin.model_manager.model_interface.openstudio_model or OpenStudio::get_model_interface(Sketchup.active_model).openstudio_model. That was a change SketchUp requested, they didn't like plug-ins adding methods to their SketchUp Model class.

edit flag offensive delete link more

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2022-02-17 00:18:05 -0600

Seen: 870 times

Last updated: Feb 17 '22