Importing OpenStudio into GHPython not Working for OpenStudio 3.5 and Above

@chris I’m getting this error, how do I get past this? Any help would be appreciated.
Thank you!

HI @amar ,

Sorry for the very late response and thank you for reporting the issue. This is a bug that results from the fact that the OpenStudio CSharp bindings have been moving around in the OpenStudio installers released by NREL. I know that they’re reshuffling a lot of their bindings in order to add better support for OpenStudio Python bindings, which is going to be great once it’s available.

However, for the OpenStuido 3.5 and 3.6 installers, it seems they have forgotten to include a critical file for their CSharp bindings (OpenStudio.dll) in their installer amidst the reshuffle. So there doesn’t seem to be any way to use the OpenStudio .NET bindings using just what is included in the installer (you’d have to download some extra resources from their NuGet package). I opened up an issue on their GitHub asking if they can add this back in future OpenStudio installers or explain if I’m missing something (it’s also possible that @MingboPeng might know more as the OpenStudio CSharp master of the LBT community).

In the meantime, the best way to make sure that you always have a complete set of the OpenStudio .NET bindings in a place where Ladybug Tools can find them is by using the free Pollination single-click installer. So that’s what I’d recommend doing now (and going forward until this big project with OpenStudio Python bindings is more stable in a couple of years).

As @chris says. The best way is to use the Pollination installer to install all compatible engines with LBT.

In terms of missing openstudiolib.dll, you probably can find it in the OpenStudio’s bin folder, and copy it to where it is looking for.

Thanks, @MingboPeng . The openstudiolib.dll is in that folder as you say and I can copy it but there’s still no OpenStudio.dll anywhere in the NREL installer. So this is making it impossible to import OpenStudio in IronPython unless there’s something I’m missing here.

Am I correct that all of the dlls that you’re putting in the Pollination installer come from the OpenStudio NuGet package, @MingboPeng ? I see that the NuGet package comes with an OpenStudio.dll that I can use.