First time here? Check out the Help page!
1 | initial version |
I might be totally misunderstanding your question but...
There is no model.getAirLoopHVAC
. All methods to return model objects are like model.getWhateverObjects
(note the "s" on the end) and return an array of objects. So if you wanted a list of AirLoopHVAC names, you could do:
air_loop_hvac_names = []
model.getAirLoopHVACs.each do |air_loop_hvac|
air_loop_hvac_names << air_loop_hvac.name.get
end
or in a one-liner:
air_loop_hvac_names = model.getAirLoopHVACs.map{ |air_loop_hvac| air_loop_hvac.name.get }
2 | No.2 Revision |
I might be totally misunderstanding your question but...
There is no model.getAirLoopHVAC
. All methods to return model objects objects, for which there can be more than one, are like model.getWhateverObjects
(note the "s" on the end) and return an array of objects. So if you wanted a list of AirLoopHVAC names, you could do:
air_loop_hvac_names = []
model.getAirLoopHVACs.each do |air_loop_hvac|
air_loop_hvac_names << air_loop_hvac.name.get
end
or in a one-liner:
air_loop_hvac_names = model.getAirLoopHVACs.map{ |air_loop_hvac| air_loop_hvac.name.get }