2

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

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

zhengangzhu's avatar
261
zhengangzhu
asked 2015-05-20 03:44:40 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2015-11-12 16:44:52 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

4

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.

MarkAdams's avatar
1.8k
MarkAdams
answered 2015-05-21 10:20:19 -0500, updated 2015-05-21 10:30:23 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
3

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)
Kyle Benne's avatar
6k
Kyle Benne
answered 2015-05-21 10:26:02 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments