PINVOKE error in Export to OpenStudio component


#1

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!


#2

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.


#3

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!


#4

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


#5

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.


#6

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”.


#7

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.