I have a measure that injects all the objects in an IDF file into the main idf file. It has been working on every file except one, the 5ZoneFanCoilDOAS_ERVOnAirLoopMainBranch.idf example file. Here are all the files.
#load the idf file
source_idf = OpenStudio::IdfFile::load(OpenStudio::Path.new(source_idf_path)).get
#add everything from the file
workspace.addObjects(source_idf.objects)
As far as I can tell, all the objects are successfully added, but Openstudio complains about Workspace.addObjects() being given an incompatible argument.
[15:31:30.476167 ERROR] Found error in state 'preprocess' with message ["Wrong arguments for overloaded method 'Workspace.addObjects'.
Possible C/C++ prototypes are:
std::vector< openstudio::WorkspaceObject,std::allocator< openstudio::WorkspaceObject > > Workspace.addObjects(std::vector< openstudio::IdfObject,std::allocator< openstudio::IdfObject > > const &idfObjects, bool checkNames)
std::vector< openstudio::WorkspaceObject,std::allocator< openstudio::WorkspaceObject > > Workspace.addObjects(std::vector< openstudio::IdfObject,std::allocator< openstudio::IdfObject > > const &idfObjects)
std::vector< openstudio::WorkspaceObject,std::allocator< openstudio::WorkspaceObject > > Workspace.addObjects(std::vector< openstudio::WorkspaceObject,std::allocator< openstudio::WorkspaceObject > > const &objects, bool checkNames)
std::vector< openstudio::WorkspaceObject,std::allocator< openstudio::WorkspaceObject > > Workspace.addObjects(std::vector< openstudio::WorkspaceObject,std::allocator< openstudio::WorkspaceObject > > const &objects)
::/ruby/2.2.0/gems/openstudio-workflow-1.3.3/lib/openstudio/workflow/util/energyplus.rb:194:in `addObjects'
:/ruby/2.2.0/gems/openstudio-workflow-1.3.3/lib/openstudio/workflow/util/energyplus.rb:194:in `energyplus_preprocess'
:/ruby/2.2.0/gems/openstudio-workflow-1.3.3/lib/openstudio/workflow/jobs/run_preprocess.rb:58:in `perform'
:/ruby/2.2.0/gems/openstudio-workflow-1.3.3/lib/openstudio/workflow/run.rb:269:in `step'
:/ruby/2.2.0/gems/openstudio-workflow-1.3.3/lib/openstudio/workflow/run.rb:216:in `run'
:/openstudio_cli.rb:848:in `execute'
:/openstudio_cli.rb:639:in `execute'
:/openstudio_cli.rb:1614:in `<main>'
eval:107:in `eval'
eval:107:in `require_embedded_absolute'
eval:92:in `block in require'
eval:86:in `each'
eval:86:in `require'
eval:2:in `<main>'"]}