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

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

asked 2019-02-06 12:52:35 -0600

updated 2019-02-07 07:38:07 -0600

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2019-02-06 15:45:37 -0600

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.

edit flag offensive delete link more

Comments

Many thanks! You saved my day.

mapascual's avatar mapascual  ( 2019-02-07 01:12:18 -0600 )edit

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

3 followers

Stats

Asked: 2019-02-06 12:52:35 -0600

Seen: 182 times

Last updated: Feb 06 '19