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

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

Replace _ with :

click to hide/show revision 2
No.2 Revision

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

Replace So replace the _ with :.

click to hide/show revision 3
No.3 Revision

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

click to hide/show revision 4
No.4 Revision

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