Export to OPENSTUDIO error "ModelCorePINVOKE"

Hi there, apologies for the radio silence. We have tried all the above but nothing seems to work.
We also tried a fresh installation of both OpenStudion 2.5.0 and 2.5.1, on a brand new machine, which also didn’t work. The PINVOKE issue persists.

Has anyone ever managed to run openstudio V2.5.0 (i.e. E+ V8.9.0) through HoneyBee?

Hi again,

As means of update on this, we’ve managed to bypass the PINVOKE issue by downgrading to E+ version 8.6 and OpenStudio version 1.14.

There seems to be an issue with E+ version 8.9, which is included in OpenStudio 2.5.0.

Hope that helps.

I’m perpetually confused when it comes to which versions of which programs are supported.
Seems like @devang is running an older version of E+ but a newer version of OS:

Honeybee supports OpenStudio 2.5
There’s no need to install EnergyPlus once you install OpenStudio.

1 Like

I just wanted to make a (hopefully useful) conclusion here based on all of this discussion. Given what people have tried here and my personal experience teaching HB energy model workflows, it seems very clear that certain versions of OpenStudio are less prone to the PINVOKE error than others.

Notably, @mostapha and I have taught several workshops with OpenStudio 2.4 and we have yet to encounter an PINVOKE error with any of the participants. So this seems to be a more stable version.

All of this said, the discussion here is evidence that some people still experience the PINVOKE error in OpenStudio 2.4 but, for these cases, it seems that OpenStudio 1.14 is able to run without the PINVOKE error.

While this isn’t a perfect solution, it seems like the best that we can offer now until OpenStudio team figures out what is causing this issue.

4 Likes

http://hydrashare.github.io/hydra/viewer?owner=chriswmackey&fork=hydra_2&id=Microclimate_Map_-_Simple&slide=0&scale=1&offset=-16.380859375,-22.50505632365224

for this example file i need openstudio i have latest version installed but same PINVOKE error. After reading your comment uninstalled latest and installed old version as mentioned but after that, the file says no Openstudio found even though when i have old one installed. Any idea what to do now.

Regards,

@Missi ,

See here: How to get Honeybee Legacy working with OpenStudio 3.0

You definitely don’t want to go all of the way back to OpenStudio 1. I suggest either OpenStudio 2.9.1 (if you want something that works out of the box) or OpenStudio 3.0.0 (if you want the latest and greatest and are willing to follow the steps in the link aobve)

1 Like

Thanks @chris installation issues solved.

Now new problem. Is this

~M

You are using an old version of the plugin that is incompatible with OpenStudio 3.0. Update your installed version of Ladybug Tools from the one this past August.

1 Like

Actually this issue is solved by @devang reply some where in old thread. I need to move my .epw file to C file folder where Ladybug file is there. Thanks

P.S. All my plugins where latest. Except one as suggested my your instruction manual

I confirm this statement, openstudio 2.4 doesn’t have this problem

Same here, 2.4 works for me without issues. In case anyone is having trouble finding the older version to download: https://github.com/NREL/OpenStudio/releases/tag/v2.4.0

Hi,

I recently met the same issue of “1. Solution exception: The type initializer for ‘OpenStudio.OpenStudioModelCorePINVOKE’ threw an exception.” when installing LB legacy version with Openstudio 3.0.1.

My solution is to get an OS file and set the default app to be OS, then the issue disappears.

Cannot guarantee it works for everyone, but it at least works for me.

@HAOBOLIU hi dear , could you please define this step in detail ,it would be more helpfull

If you want to use OpenStudio 3.0 with legacy honeybee, then your solution is here:

even in 2020 i got this message

some can make youtube tutorial how to fix this

I am using openstudio 3.4 with ladybug and honeybee 1.5 and I am facing the pinvoke error. I also tried to follow the instructions in the grasshopper python script editor but it doesn’t seem to work. Do you have any tip?

Hello @yosan, I followed these steps to make it work:

  1. To uninstall all OpenStudio versions from your computer;
  2. To install OpenStudio 2.4 from here: Release OpenStudio v2.4.0 · NREL/OpenStudio · GitHub (as @feng noted);
  3. Recompute .gh file where you have the HoneyBee-Energy (v 0.0.66) set up.
    Cheers!
1 Like

it worked perfectly.

@koukinsonsaku Thank you very much. It worked once I changed the OpenStudio version.