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

How do I rename a node using Eppy?

asked 2017-04-01 01:43:38 -0500

ngkhanh's avatar

updated 2017-04-02 00:35:13 -0500

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..

edit retag flag offensive 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

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-04-01 03:14:02 -0500

updated 2017-04-03 04:47:59 -0500

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.

edit flag offensive delete link more

Comments

Yes i focus on update on other objects and node management

ngkhanh's avatar ngkhanh  ( 2017-04-02 00:36:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2017-04-01 01:43:38 -0500

Seen: 210 times

Last updated: Apr 03 '17