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

Revision history [back]

click to hide/show revision 1
initial version

EnergyPlus Eppy saveas function

Hi all, I am new to Eppy. went through the tutorial from the website. It seems can be used very straight forward. And my question here is about the function of SAVEAS.

I noticed that there are 3 save functions in eppy.modeleditor. one is save which works fine, and one is saveas which I tried and did not give me the expected output, same issue with savecopy.

I used following commends:

idf1.save() which save the changes I made in IDF file and save it in original idf file.

idf1.saveas("test") which didnt give me any error, however, no "test" file saved.

idf1.savecopy("test") which did not give me any error either, however, no "test" file saved.

I checked with the origin python code of eppy.modeleditor of the function save saveas savecopy. However, I have no idea, which part went wrong when I am trying to save it to a new file named test not in original file.

def saveas(self, filename, lineendings='default'):
    self.idfname = filename
    self.save(lineendings=lineendings)

def savecopy(self, filename, lineendings='default'):
    """save a copy as filename"""
    self.save(filename, lineendings=lineendings)

Thanks for your help and kind support Thanks again.

EnergyPlus Eppy saveas function

Hi all, I am new to Eppy. went through the tutorial from the website. It seems can be used very straight forward. And my question here is about the function of SAVEAS.

I noticed that there are 3 save functions in eppy.modeleditor. one is save which works fine, and one is saveas which I tried and did not give me the expected output, same issue with savecopy.

I used following commends:

idf1.save() which save the changes I made in IDF file and save it in original idf file.

idf1.saveas("test") which didnt give me any error, however, no "test" file saved.

idf1.savecopy("test") which did not give me any error either, however, no "test" file saved.

I checked with the origin python code of eppy.modeleditor of the function save saveas savecopy. However, I have no idea, which part went wrong when I am trying to save it to a new file named test not in original file.

def saveas(self, filename, lineendings='default'):
    self.idfname = filename
    self.save(lineendings=lineendings)

def savecopy(self, filename, lineendings='default'):
    """save a copy as filename"""
    self.save(filename, lineendings=lineendings)

Thanks for your help and kind support Thanks again.