First time here? Check out the Help page!
1 | initial version |
Simply save the IDF using eppy, it sorts automatically
idf = IDF(idfpath) idf.saveas(idfpath)
2 | No.2 Revision |
Simply save the IDF using eppy, it sorts automatically
idf = IDF(idfpath) idf.saveas(idfpath)
Here's an entire script to sort all the IDF files that are in the same folder as the python file:
from eppy import modeleditor from eppy.modeleditor import IDF import os iddfile = "C:/EnergyPlusV9-0-1/Energy+.idd" IDF.setiddname(iddfile) dir = os.path.dirname(os.path.realpath(__file__)) for path, subdirs, files in os.walk(dir): for name in files: ext = os.path.splitext(name)[-1].lower() if ext == ".idf": idfpath = os.path.join(path, name) idf = IDF(idfpath) idf.saveas(idfpath)