Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

water use equipment space OS-3.7.0 vs. OSApp-1.7.0

asked 2024-07-19 15:19:05 -0500

mattkoch's avatar

updated 2024-07-22 12:15:32 -0500

A OS:WaterUseEquipment object in OpenStudioApp 1.7.0 has a "Space Name" field under HVAC -> Service Hot Water -> Water Use Connection -> Water Use Equipment. Yet, the OpenStudio 3.7.0 WaterUseEquipment class does not seem to have a method to assign a Space to a WaterUseEquipment. So, for now, I suppose this has to be done manually in OpenStudioApp 1.7.0? Am I missing something?

edit retag flag offensive close merge delete

Comments

1

Thank you for your very fast answers below! Much appreciated and certainly 100% on target.

For People, Lights and ElectricEquipment, there is a Detailed Description which references SpaceLoadinstance -> SpaceLoad -> SpaceItem -> setSpace(). For WaterUseEquipment, Detailed Description only references ModelObject, and that is what threw me off -> "Inheritance diagram for openstudio::model::WaterUseEquipment", duh!

I had never made use of "List of all members" but am very grateful for the hint here and will make more use of this in the future to preempt having to ask questions such as mine!

mattkoch's avatar mattkoch  ( 2024-07-22 12:20:13 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2024-07-22 02:40:42 -0500

updated 2024-07-22 08:42:12 -0500

What Denis said.

When you look at the SDK documentation for an object, you can click the button "List of all members"

Eg: here is the SDK documentation for WaterUseEquipment

image description


This will take you to this page WaterUseEquipment Member List where you'll find all members, including inherited methods.

image description

edit flag offensive delete link more
3

answered 2024-07-19 15:52:29 -0500

updated 2024-07-19 15:53:57 -0500

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)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

Stats

Asked: 2024-07-19 15:19:05 -0500

Seen: 159 times

Last updated: Jul 22