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

OpenStudio SketchUp plugin error - trouble installing plugin

asked 2020-07-20 21:14:45 -0600

alang's avatar

updated 2020-08-16 16:30:32 -0600

Hi,

I'm having trouble getting the OpenStudio plugin for SketchUp to work. The closest I have been to succeeding was by:

  1. Installing sketchup 2019 or sketchup 2020 (I have tried both, with the same result)
  2. Install OpenStudio Application 1.0.0 from GitHub
  3. Download OS plugin for SU version 1.0.0 from GitHub
  4. Install the plugin within SU using the extension manager

This works initially, with OpenStudio toolbars appearing and seeming to work. But when I close SketchUp and reopen it, I get the following error message and the OS toolbars no longer appear.

Error Loading File C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/OpenStudio/Startup.rb
Error: #<NoMethodError: undefined method `inspector_dialog' for nil:NilClass>
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/interfaces/RenderingColor.rb:197:in `update_entity'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/interfaces/DrawingInterface.rb:173:in `draw_entity'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/interfaces/ModelInterface.rb:944:in `block in attach_openstudio_model'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/interfaces/ModelInterface.rb:942:in `each'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/interfaces/ModelInterface.rb:942:in `each_with_index'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/interfaces/ModelInterface.rb:942:in `attach_openstudio_model'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/ModelManager.rb:227:in `attach_openstudio_model'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/ModelManager.rb:177:in `open_openstudio'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/ModelManager.rb:142:in `new_from_path'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/ModelManager.rb:117:in `new_from_skp_model'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/PluginManager.rb:165:in `start'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/PluginManager.rb:544:in `<module:OpenStudio>'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio/lib/PluginManager.rb:87:in `<top (required)>'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/OpenStudio/Startup.rb:67:in `load'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/OpenStudio/Startup.rb:67:in `<top (required)>'
C:/Program Files/SketchUp/SketchUp 2020/Tools/extensions.rb:197:in `require'
C:/Program Files/SketchUp/SketchUp 2020/Tools/extensions.rb:197:in `load'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio.rb:45:in `register_extension'
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio.rb:45:in `<top (required)>'

I have also read through discussions here and on GitHub, and tried a bunch of solutions to similar issues from the past, but with no luck. Any suggestions would be very much appreciated!

Thanks, Alan

edit retag flag offensive close merge delete

Comments

I opened an issue on the new OpenStudio SketchUp Plugin repo. Couple of questions:

  1. Did you point the plugin at an OpenStudio Application installation that was later removed?
  2. What does Sketchup.read_default("OpenStudio", "OpenStudioDir") return if you run in the Ruby console? The plugin should point to directory like: C:\openstudioapplication-1.0.1
  3. If the path in 2 looks wrong, try Sketchup.write_default("OpenStudio", "OpenStudioDir", "") to reset it
macumber's avatar macumber  ( 2020-07-22 00:25:05 -0600 )edit

Thanks for your reply.

I was careful to always point the plugin to a current application folder. Checking OpenStudioDir in the Ruby console returns "C:/openstudioapplication-1.0.0" (without the quotation marks), which is the correct folder for the application I have installed now.

alang's avatar alang  ( 2020-07-22 19:09:35 -0600 )edit

Thanks for the reply and your patience. If you are able, can you disable the OpenStudio extension, restart SketchUp, then open the Ruby console and enter the following commands:

openstudio_dir = Sketchup.read_default("OpenStudio", "OpenStudioDir")

openstudio_modeleditor_rb = File.join(openstudio_dir, "Ruby/openstudio_modeleditor.rb")

load(openstudio_modeleditor_rb)

What output do you get from that? You should make sure that you don't have multiple OpenStudio extensions installed. If all else fails, I would try re-installing the OpenStudio Application and SketchUp Plug-in.

macumber's avatar macumber  ( 2020-07-22 22:57:14 -0600 )edit

With the plugin uninstalled (I tried just disabling it, but when I relaunched SketchUp it reactivated), those commands return:

C:/openstudioapplication-1.0.0

C:/openstudioapplication-1.0.0/Ruby/openstudio_modeleditor.rb

true

I've uninstalled and reinstalled Sketchup, the OpenStudio Application, and the Plugin a few times now, and hit the same error each time.

I can get SketchUp Make 2017 to work with OpenStudio 2.9.1, so I can use that as a contingency. I'm happy to try anything else to get the plugin v1.0.0 to work though, if you have any more suggestions.

alang's avatar alang  ( 2020-07-23 02:50:39 -0600 )edit

That is very odd, the script you ran is about 50% of the way to loading the plugin. Can you try downloading the source code directly. Unzip the source code, I unzipped mine in my downloads folder, then run the script in this gist after updating the plugin_path to point to the path where you unzipped the plugin too?

macumber's avatar macumber  ( 2020-07-23 23:45:39 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2020-07-30 00:07:32 -0600

We tracked this down to double clicking on a SketchUp model with existing OpenStudio materials in it rather than opening SketchUp without double clicking on a SketchUp model. We have fixed this for the next release of the plug-in, thanks for all the help debugging Alan!

https://github.com/openstudiocoalitio...

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

Stats

Asked: 2020-07-20 21:14:45 -0600

Seen: 1,523 times

Last updated: Jul 30 '20