First time here? Check our help page!
2

How to access openstudio model via Sketchup 2021 ruby console?

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?

TomB's avatar
1.7k
TomB
asked 2022-02-17 00:18:05 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2022-02-17 08:27:23 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

3

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.

macumber's avatar
12k
macumber
answered 2022-02-17 20:29:01 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments