2

Node class in OS SDK

Hello, 1/i read here and see that most of method for Node::Model has been deprecated. How node object is definited in OS ?

2/how we determine node name (node object) of assign setpoint manager to a defined (added to airloop/waterloop) straight component like cooling coil, fan, VAV box, etc ?

3/ Have any method to get string directly from text object in .OSM similar to object.setString(number of line," content") ?

ngkhanh's avatar
2.2k
ngkhanh
asked 2016-01-29 10:16:59 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

3

1) The Node::addSetpointManager overloads have been deprecated in favor of addToNode. You can also determine the setpoint node associated with an SPM with the setpointNode method.

2.a) If you want to add a setpoint manager spm to a StraightComponent comp.

# assuming comp is a StraightComponent
spm.addToNode(comp.outletModelObject.get.to_Node.get)

2.b) If you have a setpoint manager, spm.

spm.setpointNode.get.nameString

3) Technically every OpenStudio ModelObject has the method object.setString(index,value) but this is entirely unsupported and we strongly discourage doing it. These methods may even become private and inaccessible in the future as it is possible to corrupt your OpenStudio model using them.

Kyle Benne's avatar
6k
Kyle Benne
answered 2016-01-29 10:33:28 -0500, updated 2016-01-29 10:58:05 -0500
edit flag offensive 0 remove flag delete link

Comments

@Kyle Benne : Thank a lot. In case i want add a straightComponent to before or after an added in objects comp , how code will look like ? straightComponent.addToNode(comp.outletModelObject.get.to_Node.get) , is it ok ? I see in some Model Objects the term : InletPort and OutletPort, what they are ?

ngkhanh's avatar ngkhanh (2016-01-29 12:08:28 -0500) edit

This answer explains the port objects.

ericringold's avatar ericringold (2016-01-29 13:43:31 -0500) edit

Thank you very much @Eric Ringold . is there any method to loop all set point manager, i need to delete all default SPM in output .idf ?

ngkhanh's avatar ngkhanh (2016-01-30 06:26:58 -0500) edit
add a comment see more comments