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

Revision history [back]

Arguments for the getObjectsByType method need to use the EnergyPlus object name verbatim.

Replace _ with :

Arguments for the getObjectsByType method need to use the EnergyPlus object name verbatim.

Replace So replace the _ with :.

Arguments for the getObjectsByType method need to use require the EnergyPlus object name to be passed in verbatim. So replace the _ with :.

Arguments for the getObjectsByType method require the object name to be passed in verbatim. So replace the _ with :.. Here's what I would try:

# get objects
objects = workspace.getObjectsByType('ZoneVentilation:DesignFlowRate'.to_IddObjectType) #array

# DO STUFF
if not objects.empty?

  objects.each do |object|

    puts 'Setting schedule for : #{object.getString(0)}'
    object.setString(2, schedule)

  end

end