First time here? Check out the Help page!

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

Hi @mattkoch. The WaterUseEquipment class inherits from the more general SpaceItem class.

image description

... which offers methods like space, setSpace and resetSpace. Although classes have functionality expanded over the years, the inheritance diagram remains +/- the same. In Ruby, this would look something like:

require 'openstudio'
model = OpenStudio::Model::Model.new
space = OpenStudio::Model::Space.new(model)
wue_def = OpenStudio::Model::WaterUseEquipmentDefinition.new(model)
equip = OpenStudio::Model::WaterUseEquipment.new(wue_def)
equip.setSpace(space)
click to hide/show revision 2
No.2 Revision

Hi @mattkoch. The WaterUseEquipment class inherits from the more general SpaceItem class.

image description

... which offers methods like space, setSpace and resetSpace. Although classes have had functionality expanded over the years, the inheritance diagram remains +/- the same. In Ruby, this would look something like:

require 'openstudio'
model = OpenStudio::Model::Model.new
space = OpenStudio::Model::Space.new(model)
wue_def = OpenStudio::Model::WaterUseEquipmentDefinition.new(model)
equip = OpenStudio::Model::WaterUseEquipment.new(wue_def)
equip.setSpace(space)