3

How do I rename a node using Eppy?

I want to rename node but in idf file has no node object so i can not use modeleditor.rename(idf, "MATERIAL", "G01a 19mm gypsum board", "peanut butter) and need to manual check for object. Have any other pathway for that task ?

Branch,  
    Chilled Water Loop Supply Branch 1,  !- Name  
    ,                        !- Pressure Drop Curve Name  
    Pipe:Adiabatic,          !- Component 1 Object Type  
    Pipe Adiabatic 6,        !- Component 1 Name  
    Node 44,                 !- Component 1 Inlet Node Name  
    Node 45;                 !- Component 1 Outlet Node Name

I want to change name of Node 44/45. I can change Node 45 to Chilled Water Loop Supply Branch 1 outlet Node at this Branch but other object refer to Node 45 would not be updated. Which is the best way to update name change in other objects ?
Edited: Has anyway to print out branch node details- .bnd file for easier viewer - check node set point manager , inter-loop connection,etc..

ngkhanh's avatar
2.2k
ngkhanh
asked 2017-04-01 01:43:38 -0500, updated 2017-04-02 00:35:13 -0500
edit flag offensive 0 remove flag close merge delete

Comments

I don't understand the question. Can you give an example of what your IDF looks like, and what you would like it to be changed to?

Jamie Bull's avatar Jamie Bull (2017-04-01 02:24:09 -0500) edit
add a comment see more comments

1 Answer

1

You can change the names of nodes on a branch using getobject and then changing each node:

branch = idf.getobject('Branch', 'Chilled Water Loop Supply Branch 1')
branch.Component_1_Name = 'Node 3'
branch.Component_1_Inlet_Node_Name = 'Node 1'

This won't update other nodes that also refer to that node though. I don't think we have anything built in to do that yet (though @santoshphilip may correct me).

Thinking through the process of finding and changing all instances of a given node name, the algorithm would involve having a list of every object type that can take a node name as value for any of its fields (i.e. it has \type node in the IDD), iterating over them all checking for the presence of the given node name, and changing it if present.

Jamie Bull's avatar
5.1k
Jamie Bull
answered 2017-04-01 03:14:02 -0500, updated 2017-04-03 04:47:59 -0500
edit flag offensive 0 remove flag delete link

Comments

Yes i focus on update on other objects and node management

ngkhanh's avatar ngkhanh (2017-04-02 00:36:11 -0500) edit
add a comment see more comments