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

Yes, in the end, I was able to do initialization checks on these entities:

  model_curve_check = model.getCurveByName(curve_name.get)
  library_curve_check = library_model.getObjectByTypeAndName(OpenStudio::Model::CurveBiquadratic::iddObjectType,curve_name.get)

And if these curves exist, I can do any work I want on them by doing the following:

if model_curve_check.is_initialized and library_curve_check.is_initialized then
  model_curve = model_curve_check.get.to_CurveBiquadratic.get
  library_curve = library_curve_check.get.to_CurveBiquadratic.get

  library_coefficient1 = library_curve.coefficient1Constant()

  if library_coefficient1 != "" then


And if only the library curve exists, then I do the following:

if not model_curve_check.is_initialized and library_curve_check.is_initialized then
  library_curve = library_curve_check.get.to_ModelObject.get.clone(model).to_CurveBiquadratic.get


I even encapsulated this in its own function, one for biquadratic, one for quadratic.

This seems to work reasonably well now.