Export IDF to EP 9.5

@chris or anyone, really. Is it possible to export an IDF to a previous version? I saw on Unmet Hours that you can modify the text in the IDF to remove new headers and such, which seems tedious, so thought I’d check and see if it’s possible. My guess is no.

Trying to get geometry files for the new Phius Revive platform and I don’t have SketchUp.

Thanks!

hi @bwatanabe

There is a hack to downgrade the version, which I tired longtime ago.

Install EPPY library in your Python and open the recent version of IDF file using the IDD file of previous EnergyPlus version. Further, save it and you will notice the change in version.

You can find the previous version of IDD files in “C:\EnergyPlusV22-2-0\PreProcess\IDFVersionUpdater” location in your system.

1 Like

Thanks for the suggestion @Naga. I’ll give it a shot!

@Naga

Have you tried this recently? I can see that there are spaces not present in the IDF files, but I also get these traceback errors that I can’t figure out. Is it a read/write restriction on my OS or something?

I’m not a python or coding expert. I’m just looking at the EPPY tutorial and trying to open an IDF file. It seems that no matter where I located the .idf, it’s not recognized when I assign it.


"C:\Users\Brent Watanabe\PycharmProjects\convertIDF\.venv\Scripts\python.exe" "C:\Users\Brent Watanabe\PycharmProjects\convertIDF\convertIDF.py" 
this node -SPACE-is not present in base dictionary
this node -SPACELIST-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -SPACELIST-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
this node -SPACE-is not present in base dictionary
this node -DESIGNSPECIFICATION:OUTDOORAIR:SPACELIST-is not present in base dictionary
Traceback (most recent call last):
  File "C:\Users\Brent Watanabe\PycharmProjects\convertIDF\convertIDF.py", line 8, in <module>
    idf1 = IDF(fname1)
           ^^^^^^^^^^^
  File "C:\Users\Brent Watanabe\PycharmProjects\convertIDF\.venv\Lib\site-packages\eppy\modeleditor.py", line 579, in __init__
    self.read()
  File "C:\Users\Brent Watanabe\PycharmProjects\convertIDF\.venv\Lib\site-packages\eppy\modeleditor.py", line 712, in read
    readout = idfreader1(
              ^^^^^^^^^^^
  File "C:\Users\Brent Watanabe\PycharmProjects\convertIDF\.venv\Lib\site-packages\eppy\idfreader.py", line 284, in idfreader1
    bunchdt = makebunches_alter(data, commdct, theidf, block)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Brent Watanabe\PycharmProjects\convertIDF\.venv\Lib\site-packages\eppy\idfreader.py", line 110, in makebunches_alter
    bobj = makeabunch(commdct, obj, obj_i, block=block)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Brent Watanabe\PycharmProjects\convertIDF\.venv\Lib\site-packages\eppy\idfreader.py", line 67, in makeabunch
    objfields = extff.increaseIDDfields(block, commdct, obj_i, key_txt, n)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Brent Watanabe\PycharmProjects\convertIDF\.venv\Lib\site-packages\eppy\ext_field_functions.py", line 51, in increaseIDDfields
    extlst = extension_of_extensible(commdct[key_i], block[key_i], n)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Brent Watanabe\PycharmProjects\convertIDF\.venv\Lib\site-packages\eppy\ext_field_functions.py", line 29, in extension_of_extensible
    n = n // ext
        ~~^^~~~~
TypeError: unsupported operand type(s) for //: 'int' and 'NoneType'

@TrevorFedyna you have some experience with EPPY, correct? Is there a way to deprecate an IDF file from the current Honeybee version down to 9.5 with EPPY?

I’m trying to get a v9.5 IDF file to use for Phius Revive and avoid using SketchUp but it seems like I’m out of luck here.

I’ll cross my fingers in hopes you know of some magical way to do this!

Thanks!

Hi @bwatanabe, I haven’t used eppy in some time but im fairly sure there is no out of the box way to backwards-convert *idf files with it.

With the below as an example from the eppy docs, is there a reason that the *.idd file can’t be variable per version of *.idf for Revive? i.e change it for the newest version of E+ or 9.5 etc tentative to whatever the input is? Which would make things more modular.

What is the explicit reason 9.5 is the current goal?

image

Hi @TrevorFedyna,

Yes, I tried to just use the 9.5 IDD with a current (23.2) IDF but then nothing runs. At present, the Phius tool only accepts E+ 9.5 IDF files as its geometry input.

I assume this doesn’t work because “Spaces” were a pretty big breaking change based on reading through some older threads here.

If I go back to an old version, do you think that’s a plausible solution to output v9.5 IDF files? I’m not even sure what version that would be. And if I go back, do I have to “downgrade” LBT everytime I want to make an old IDF file? :man_facepalming:t3:

You would need the 23.2 idd for a 23.2 idf to work.

I’m not totally sure, in my small experience there is always something that has to be edited in an upgraded file to make it work for what that is worth, nothing is truly plug and play with changing *.idf versions

Knowing of PHIUS and being semi-familair (browsed REVIVE code before), would not making the tool un-dependent on idf.v 9.5 be easier at this point than trying to figure out how to downgrade the *idf files? A bit of a solution with some future proofing per say. just my unsolicited $0.02

Best
-trevor

1 Like

Knowing of PHIUS and being semi-familair (browsed REVIVE code before), would not making the tool un-dependent on idf.v 9.5 be easier at this point than trying to figure out how to downgrade the *idf files? A bit of a solution with some future proofing per say. just my unsolicited $0.02

Yeah, I’m just an end user, but I agree on the future proofing. My understanding is that they started developing the Revive tool while E+9.5 was the current build and in that time, everything has upgraded to 23.2 or later.

I guess I’ll just stick with exporting geometry to SketchUp and “tracing” over geometry in Euclid or whatever.

Thanks for taking a look!
Brent

Hi @bwatanabe

Its not the file opening issue as I saw in your error message you have shared.

The EPPY is indicating you that the fields belonging to specific E+ objects that are not available in previous version of E+. If you are interested, you can handle them using text editor.

As @TrevorFedyna mentioned, its not a plug and play to handle the change of versions. With new versions of E+, there are new objects and fields that gets added or even expelled, which is why downgrading becomes complex.

Instead of exporting geometry to Sketchup, I recommend you to try to used HB loadEModel component. Usually it reads the geometry from IDF file and replaces properties missing in the older versions with default.

However, thank you @bwatanabe for letting me know the new redundancies with my old hack.

1 Like

Hi @bwatanabe I just had a thought, there are all the old lbt version installers on food4rhino.com, you could always use the applicable version that works with idf v9.5 instead of using the newest LBT I think there might be a chart somewhere that says what version works with what e+ version which would help narrow down the right LBT version

best
-trevor

2 Likes

Hi @TrevorFedyna,

That’s what I was trying to say in my original message to you, but I did it poorly by not explicitly saying revert my ladybug tools version. The question I have with downgrading LBT is do I have to uninstall the newest version and then install an old version and keep going back and forth? Or can you have 2 installs (an old one, and a new one) simultaneously.

@Naga Thanks for your suggestions, but I don’t need current version IDF files. I need old ones, at least right now until Phius updates. I’ll give the LBT downgrade a try this week and see what happens.

Cheers,
Brent

1 Like

@TrevorFedyna

Based on the compatibility matrix I need LBT 1.3 which is supported on Rhino 7 but not 8. So if I uninstall LBT in both versions and install 1.3 in Rhino 7 and have the newest build in Rhino 8, that should technically work, right? Maybe?

@bwatanabe oops I must have missed that my bad!
If the 9.5 version is LBT 1.3 you should be able to use the LB Versioner to switch between versions 1.3 and the newest as needed rather than having to do any uninstall/reinstalling when you are switching back and forth from Rhv7 and 8 or need new or 1.3.
image

I don’t think with how the installation works that you can have two separate installs of new LBT.

Hopefully that is helpful!
-trevor

2 Likes

@TrevorFedyna How silly of me to forget about the versioner :man_facepalming:t4:

Thanks!

I never knew that we can use version to downgrade. Amazing!! Thank you everyone.

@TrevorFedyna

So, in theory this should all work, so apologies for replying to a solved issue, BUT, when I downgrade I run into this:

Runtime error (AssertionException): C:\Program Files\ladybug_tools\resources\standards\honeybee_standards lacks a "constructions" folder.

Traceback:
  line 584, in _check_standards_folder, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\config.py"
  line 240, in standards_data_folder, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\config.py"
  line 361, in _load_from_file, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\config.py"
  line 317, in config_file, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\config.py"
  line 60, in __init__, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\config.py"
  line 602, in <module>, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\config.py"
  line 3, in <module>, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\writer.py"
  line 10, in <module>, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\material\opaque.py"
  line 3, in <module>, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\material\dictutil.py"
  line 14, in <module>, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\properties\model.py"
  line 19, in <module>, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\_extend_honeybee.py"
  line 8, in <module>, "C:\Program Files\ladybug_tools\python\Lib\site-packages\honeybee_energy\__init__.py"
  line 99, in script

I looked and there’s definitely not a constructions folder \honeybee_standards, but there is on in \honeybee_energy_standards. Do I need to manually update a file somewhere? Seems like I need to update these python files to find the different folders, but I thought I’d check first…

Hi @bwatanabe sorry I’m not sure about the construction folder, it may be worth opening a new topic for that issue.

1 Like

No worries. I found a post that helped. Uninstalled Pollination, then installed LBT v1.3. Doubt that’s the best way to do it, but it fixed the issue.