Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

attribute model is read-only in OpenStudio API

I am having error to run energy simulation using Honeybee interface with error message below.

Solution exception:The type initializer for 'OpenStudio.OpenStudioModelCorePINVOKE' threw an exception.

I found discussion solving this issue and tried to follow what they have tested to check the environment as below.
However, I get the error below and this is not suitable to check the environment.
Does anyone know why I get below error, while they didnt get this error in discussion?

Runtime error (MissingMemberException): 'namespace#' object attribute 'model' is read-only

import sys  
import clr

sys.path.append(r'C:\openstudio-2.4.0\CSharp\openstudio')  
clr.AddReferenceToFileAndPath(r'C:\openstudio-2.4.0\CSharp\openstudio\OpenStudio.dll')

import OpenStudio  
model=OpenStudio.model()  
print model