First time here? Check out the Help page!
1 | initial version |
You are missing .get when you get the OSOptionalQuantity , so your code should look like that:
model.runSizingRun()
model.getAirLoopHVACs.each do |air_loop|
supply_components = air_loop.supplyComponents
supply_components.each do |supply_component|
unit = supply_component.to_FanVariableVolume
if not unit.empty?
fan_vv = unit.get
runner.registerInfo("#{fan_vv.name}")
if fan_vv.isMaximumFlowRateAutosized == true
runner.registerInfo("Autosized")
flow_rate = fan_vv.getMaximumFlowRate.get
runner.registerInfo("#{flow_rate}")
else
runner.registerInfo("Not Autosized")
end
end
end
end
2 | No.2 Revision |
You are missing .get when you get assign the OSOptionalQuantity , so your code should look like that:
model.runSizingRun()
model.getAirLoopHVACs.each do |air_loop|
supply_components = air_loop.supplyComponents
supply_components.each do |supply_component|
unit = supply_component.to_FanVariableVolume
if not unit.empty?
fan_vv = unit.get
runner.registerInfo("#{fan_vv.name}")
if fan_vv.isMaximumFlowRateAutosized == true
runner.registerInfo("Autosized")
flow_rate = fan_vv.getMaximumFlowRate.get
runner.registerInfo("#{flow_rate}")
else
runner.registerInfo("Not Autosized")
end
end
end
end