PINVOKE error in Export to OpenStudio component

When I attempt to simulate HVAC systems 11-14 using the Honeybee_HVACSystemsList and Honeybee_Assign HVAC Systems components, I get the following error in the Honeybee_Export to OpenStudio component…

  1. Solution exception:The type initializer for ‘OpenStudio.OpenStudioModelSetpointManagerPINVOKE’ threw an exception.

Note: Running HVAC systems 0-10 work fine.

OpenStudio 1.12 installed
OpenStudio 2.4 installed
OpenStudio 2.6 installed
IronPython 2.7.8 installed

I saw some other posts regarding this issue but didn’t necessarily see a clear solution. It’s possible that I need to check if certain .dll files are located in the appropriate folders. Any help would be great…thanks!

Hi Josh, this is the bug from OpenStudio 2.5.1 to 2.6.
If you uninstall version 2.6, that error should go away.

PS: OpenStudio 2.7 has fixed this problem, but Honeybee does’t support 2.7 yet.

great…I will do that!

Will 2.5.1 still work with IronBug?

I also get this error…

  1. Solution exception:The type initializer for ‘OpenStudio.OpenStudioModelSetpointManagerPINVOKE’ threw an exception.

…in the IronBug_SetpointManagerScheduled component…will this uninstall of 2.6 fix this as well? I’m assuming I need to reinstall Ironbug too to reassoicate it with the correct OpenStudio version?

thanks again!

also, while I have access to you…in your IronBug VAV Reheat System example…what is the “puppets” component name and where is it found and what exactly is this doing in the script??

image

This problem has been introduced in OpenStudio from 2.5.1, but 2.5.0 will work.
Yes, if you want to use different version of OpenStudio in Ironbug, you can just copy all files in

YourOpenStudioInstallationFolder\CSharp\openstudio

to Ironbug folder (override all original files).

I haven’t tested Ironbug with 2.4, but let me know if it works.

This “puppet” component has been renamed as “Ironbug_Duplicate”. it basically creates multiple instances of referenced obj.

Use this component to avoid copy and paste the same HVAC component multiple times, and it also solved the problem when some HVAC component just like CoilHeatingWater object that can co-exist in two or more different loops. In each loop, the CoilHeatingWater has to be pointing to one instance instead of two different CoilHeatingWaters, this when the “puppet” concept comes in. So in one loop, the CoilHeatingWater object is the puppet.

Because this might be very difficult for users to understand, so I made it simple, just call it as “duplicate”.

thanks again for all your help…everything, including IronBug, is working great with OpenStudio 2.5…no more PINVOKE errors.

and thanks for the “Duplicate” component explanation…makes complete sense.

Hi Mingbo,

Sorry for digging this post out but I have the same issue with “export to OpenStudio component” and Ironbug components.
I have tested with OpenStudio 3.0.1 and OpenStudio 3.1.0. The issue occurs with both version.
“1. Solution exception:The type initializer for ‘OpenStudio.OpenStudioModelCorePINVOKE’ threw an exception.”
Just FYI, i have HB-Legacy 0.0.66, LB-Legacy 0.0.69 and LB/HB 1.0.0 installed.

Is this the issue i can fix on my end? or something that your team is working on?

Thanks,

Geli

@MingboPeng will most likely respond with a lot better information, but in the meantime, did you read thru this post and make the suggested updates?

2 Likes

Oh this is exactly what i am looking for and it solved my issue. thank you Josh!

1 Like