Revision history  [back]

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

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

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

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

Replace _ with :.