2

How can I add a setpoint manager to DX:CoolingCoil outlet node in a ruby script?

I am writting a ruby script and I need to add a setpoint manager to the outlet node of a dx:coolingCoil in air loop. How can I get the outled node of a component using the openstudio sdk. Can I get the node from de port?

mapascual's avatar
653
mapascual
asked 2019-02-06 12:52:35 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2019-02-07 07:38:07 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

3

If you have the Coil:Cooling:DX assigned to a variable coil, and you're sure that coil is on the airloop (i.e. it is listed as a supply component on the loop) you should be able to call

node = coil.outletModelObject.get.to_Node.get

to get the outlet node assigned to node. If you're not sure the coil is assigned to a loop, you might need to add a check that coil.outletModelObject.is_initialized before 'getting' it.

ericringold's avatar
10.6k
ericringold
answered 2019-02-06 15:45:37 -0500
edit flag offensive 0 remove flag delete link

Comments

Many thanks! You saved my day.

mapascual's avatar mapascual (2019-02-07 01:12:18 -0500) edit
add a comment see more comments