6

Can eppy retain order of the objects as in the original IDF?

I have a script which uses eppy to generate an Ideal Air Loads (IAL) model from a model with a complete HVAC system. I want to do further processing on this IDF and it is necessary that I have the same order of the objects as in the original IDF (which has a sorted order based on IDF Editor 1.31). Is there a way to retain the original object order in eppy. I am using the idf.saveas() function. Probably there's a different function?

Also, is there a way to retain comments made using '!' ? IDFEditor retains them but can eppy?

hnagda's avatar
299
hnagda
asked 2019-04-18 17:46:56 -0500, updated 2019-04-18 19:11:44 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

8

There are two questions here:

  1. Can eppy retain the original order of the idf objects in the file ? Answer: No

  2. Can eppy retain all the original comments (starting with '!') ? Answer: No

Can you open separate issues for 1. and 2. at https://github.com/santoshphilip/eppy.... Describe the issues and propose a solution

Issue 1. may be easy to do. Issue 2. may not be easy to implement in eppy

If this can be implemented, this answer will be updated to reflect the functionality (If you don't open the issues, nothing will be happen :-)

santoshphilip's avatar
961
santoshphilip
answered 2019-04-19 13:20:42 -0500
edit flag offensive 0 remove flag delete link

Comments

1

Thanks Santosh! I figured out a way to do both the things using a combination of Eppy and plain text manipulation. I might raise an issue on github soon though and propose the same. I think the second issue of retaining all the original comments could be easier to solve using basic string functions in python than doing it with Eppy.

hnagda's avatar hnagda (2019-04-22 20:45:52 -0500) edit
1

If it works out, we can put your code into eppy.

santoshphilip's avatar santoshphilip (2019-04-23 09:51:46 -0500) edit

@santoshphilip Is there any update on this issue?

Mehrdad Vojdani's avatar Mehrdad Vojdani (2020-06-10 17:37:37 -0500) edit
add a comment see more comments
3

As far as I know, there is no way to retain object ordering or comments using eppy idf.saveas(), and I'm unaware of any other save functions that would.

I would recommend using Modelkit for your IDF processing. Modelkit does retain comments and ordering.

ericmartinpe's avatar
2.1k
ericmartinpe
answered 2019-04-19 13:29:39 -0500
edit flag offensive 0 remove flag delete link

Comments

1

I already have some scripts written using Eppy and migrating to a different tool at this point wouldn't be a good idea. Thanks for the suggestion though! I'd look into it for a different task in the future :)

hnagda's avatar hnagda (2019-04-22 20:49:04 -0500) edit
1

Check out my Modelkit demo videos if you're interested in using Modelkit in the future, let me know if you have any questions.

ericmartinpe's avatar ericmartinpe (2019-04-23 00:43:37 -0500) edit
add a comment see more comments