3

Does geomeppy have the eppy rename functionality?

In eppy 0.5.44 documentation there is a description of the "modeleditor.rename(idf, key, oldname, newname)" functionality for applying a new name across the entire idf. I was not able to find anything about the same functionality in the geomeppy documentation. Does anyone know if it is there, why it would not be there, or have an alternative approach to renaming objects?

Vaclav's avatar
167
Vaclav
asked 2018-12-19 09:36:12 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2018-12-19 09:41:13 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

You can just import modeleditor from eppy. Here's an example:

from geomeppy import IDF
from eppy import modeleditor

IDF.setiddname(r'C:\EnergyPlusV8-0-0\Energy+.idd')
idf_f = IDF(r'C:\EnergyPlusV8-0-0\ExampleFiles\Minimal.idf')
idf_f.add_block(name='Boring hut',coordinates=[(10,0),(10,10),(0,10),(0,0)],height=3.5)
modeleditor.rename(idf_f,'ZONE','Block Boring hut Storey 0','Block Not so boring hut Storey 0')
idf_f.idfobjects['ZONE']

The output will look like that:

[
ZONE,
    Block Not so boring hut Storey 0,    !- Name
    0.0,                      !- Direction of Relative North
    0.0,                      !- X Origin
    0.0,                      !- Y Origin
    0.0,                      !- Z Origin
    1,                        !- Type
    1,                        !- Multiplier
    autocalculate,            !- Ceiling Height
    autocalculate,            !- Volume
    autocalculate,            !- Floor Area
    ,                         !- Zone Inside Convection Algorithm
    ,                         !- Zone Outside Convection Algorithm
    Yes;                      !- Part of Total Floor Area
]
Jeremy's avatar
1.6k
Jeremy
answered 2018-12-27 16:22:19 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments