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
2

How to get the node of the zone splitter in C#

asked 9 years ago

zhengangzhu's avatar

updated 9 years ago

In C++ the node can get from this airLoop.zoneSplitter().lastOutletModelObject()->cast<node>()

But in C# the related functions are not implemented as the compiler complains

public OptionalNode supplySplitterInletNode(); public OptionalNode zoneSplitterInletNode(int zoneSplitterIndex);

So I'm in trouble to find the following node and add AirTerminalSingleDuctParallelPIUReheat to it. Any one can help? Thanks

image description

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
4

answered 9 years ago

updated 9 years ago

This is unverified C# code, but the following code is close to the c++ code snippet in the question.

node = model.toNode(airLoop.zoneSplitter().lastOutletModelObject().get()).get()

That paradigm I know works for the Python bindings, which do not have the helper functionality of the Ruby bindings.

If you want to add a terminal and ThermalZone at the same time, use @Kyle Benne advice on addBranchForZone.

Preview: (hide)
link
3

answered 9 years ago

You might consider adding the zone and the terminal in one method call to addBranchForZone, avoiding the need to retrieve the node altogether.

airLoop.addBranchForZone(zone,terminal)
Preview: (hide)
link

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

1 follower

Stats

Asked: 9 years ago

Seen: 244 times

Last updated: May 21 '15