OpenStudio SketchUp plugin error - trouble installing plugin
Hi,
I'm having trouble getting the OpenStudio plugin for SketchUp to work. The closest I have been to succeeding was by:
- Installing sketchup 2019 or sketchup 2020 (I have tried both, with the same result)
- Install OpenStudio Application 1.0.0 from GitHub
- Download OS plugin for SU version 1.0.0 from GitHub
- 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
I opened an issue on the new OpenStudio SketchUp Plugin repo. Couple of questions:
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
Sketchup.write_default("OpenStudio", "OpenStudioDir", "")
to reset itThanks 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.
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:
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.
With the plugin uninstalled (I tried just disabling it, but when I relaunched SketchUp it reactivated), those commands return:
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.
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?Also look at in the paths output with
your old Ruby path is
, check to see if there are any old OpenStudio plug-in contents laying around that might be messing with things. Finally, you might try disabling other SketchUp plug-ins, especially the legacy OpenStudio Plug-in or similar.Running your code returned this.
I can't see any remnants of other OpenStudio plugins in the old path location - its contents look the same as the plugin version you linked to, along with folders for four other plugins that installed with SketchUp.
I tried disabling all other plugins and still have the same issue. Your code returns the same result with the other plugins disabled as well.
Can you delete the entire directory under C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio and try again. That is currently being loaded and is preventing the plugin you downloaded as source from GitHub from being loaded. I want to make sure we are working with the same code.
Once you delete that folder, can you try the code in this gist? It will test if Qt dlls are being correctly loaded from the OpenStudio Application's Ruby folder into SketchUp. You should see a little window pop up that says Hello.
With that folder deleted, the code in your first gist returns this.
And your new code does generate a progress bar pop up.
I am still installing the plugin using the original 'openstudio.rbz' file I originally downloaded from Github - do I need to install by some other method to get SketchUp to use the plugin I downloaded as source (in my Downloads folder)?
After you delete
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio
don't reinstall the plugin from rbz. The code in this gist will load the plugin from your downloads directory.In your last output I still see
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio
is being loaded, I wanted to delete that and load only the code you downloaded from GitHub.Yes, I did what you are describing (i.e. uninstall plugin within SU, delete old plugin folder, run your code in SU).
The output referring to
C:/Users/alang/AppData/Roaming/SketchUp/SketchUp 2020/SketchUp/Plugins/openstudio
still appears in the Ruby console, even though that folder no longer exists. I get the warnings I linked to in my last post, no OS toolbars appear, and the plugin doesn't appear in the Plugin Manager.My question was probably a bit misleading - I was just trying to check whether I needed to take some additional steps to install the plugin from GitHub source code.