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

IDFVersionUpdater using commandline

asked 2017-10-19 17:19:52 -0500

kbk78's avatar

updated 2017-10-19 17:20:18 -0500

I have multiple idf files in version 8.4 that I want to update to version 8.8. Doing this manually involves using the IDFVersionUpdater.exe and selecting each file manually. Are there alternatives to run the updater from a commandline so that I could update the files with a script.

edit retag flag offensive close merge delete

Comments

You can call IDFVersionUpdater.exe in a script. Lots of ways to do this - do you have a preferred language? what operating system do you have?

mdahlhausen's avatar mdahlhausen  ( 2017-10-19 18:41:31 -0500 )edit

running python on windows.

kbk78's avatar kbk78  ( 2017-10-20 07:37:44 -0500 )edit

5 Answers

Sort by ยป oldest newest most voted
5

answered 2017-10-19 23:49:37 -0500

Chandan Sharma's avatar

updated 2017-10-20 13:38:29 -0500

IDFVersionUpdater can convert multiple files at once using *.lst file. Refer to AuxiliaryPrograms.pdf and search for section IDF Version Converter / Transition File Lists. If v8.4 files a.idf, b.idf and c.idf are in folder C:\EnergyPlusV8-8-0\PreProcess\IDFVersionUpdater, then 84to87.lst file should have the following contents

a.idf
b.idf
c.idf

Then IDFVersionUpdater should choose Files of type as Text File With List Of EnergyPlus Files (*.lst) and select 84to87.lst. check Create Intermediate Version Files if you want to save intermediate versions 8.5, 8.6 etc.This way IDFVersionUpdater should be run only once and there is no need to run various Transition-Vx-1-0-to-Vx-2-0.exeetc.

edit flag offensive delete link more

Comments

So essentially we would need to call each Transition-VA-B-C-to-D-E-F.exe sequentially for each intermediate versions if we wish to use the command prompt. We cannot go from 8.4 to 8.8 in one step, right?

kbk78's avatar kbk78  ( 2017-10-20 07:26:41 -0500 )edit

If all the file names are defined in lst file, IDFVersionUpdater should be run only once to convert all of them from 8.4 to 8.8. Please refer to documentation mentioned.

Chandan Sharma's avatar Chandan Sharma  ( 2017-10-20 08:11:24 -0500 )edit

Looking to run IDFVersionUpdater from the "commandline" and automate the process for repeated usage (whenever I export a file from designbuilder which outputs file in V8.4). Documentation does not mention if IDFVersionUpdater.exe can be run from the commandline. Running the program from the command line opens up the GUI. Is there a flag I can set to force it to not run the GUI and pass required parameters.

Otherwise, I guess my solution is to call each Transition-VA-B-C-to-D-E-F.exe sequentially to go from V8.4 to V8.8 Thanks!

kbk78's avatar kbk78  ( 2017-10-20 09:26:52 -0500 )edit

Several months ago, I had to convert 100s of 90.1 reference files from v8.4 to v8.7. And IDFVersionUpdater has been of great help. Otherwise I would also have used a programming language.

Chandan Sharma's avatar Chandan Sharma  ( 2017-10-20 13:26:05 -0500 )edit

Hi where I can get version updater from 8.5 to 8.8 .actually i just started using this software few days back thats why asking

newcomer's avatar newcomer  ( 2017-12-03 08:01:09 -0500 )edit

Hi, I am trying to convert a batch of .idf files from version 7.2 to 8.9. Individually, I can do it easily but I am having problems to do it using the .lst file method as suggested by Chandan. Even though I can clearly see the name of all my idf files using a notepad editor in my .lst file , the IDFupdater is saying that it did not find any file of given name. I have located my .lst file in the same folder as the .idf file. Can anybody help me out ?

Siddharth's avatar Siddharth  ( 2019-03-31 18:29:20 -0500 )edit

Make sure the LST file contains the full path and file name with the extension for each file that needs updating.

JasonGlazer's avatar JasonGlazer  ( 2019-04-03 07:55:34 -0500 )edit
1

answered 2017-10-20 11:11:59 -0500

I've done this in a fairly brute force way with Python. I'm sure there are better ways to do it. Here's the outline:

  1. Use the glob module to find all the IDFs to transition, make sure to get the full absolute paths.
  2. Use os.chdir to change directories into the directory that contains the transition executables.
  3. Loop over the IDF files with a nested loop that loops over the transition executables that are needed.

Part of the reason that I did it this way was that I wanted the intermediate versions. If you don't, then this might not be the best approach for you.

edit flag offensive delete link more
1

answered 2017-10-23 09:14:53 -0500

In general, the answer that Chandan is probably the best approach if someone has a bunch of files that they want to update to a newer version of EnergyPlus. If you want a script that can be run each time in a workflow, I would suggest a batch file that calls the Transition programs directly. Essentially, each transition program named TransitionVA-B-C-to-VD-E-F.exe needs to be run to update the file from one version to the next until you reach the version you want. The documentation on how to run Transition is here. It is important to have all the files in the proper directory including the IDD files for each version and the report variable CSV files.

edit flag offensive delete link more
0

answered 2023-07-05 16:10:57 -0500

Run this Python script to create a list of all IDFs in a folder (that you want to update):

import glob, os

f = open("update.lst", "a")
for file in glob.glob("*.idf"):
    f.write(f"{os.path.realpath(file)}\n")

f.close()

Then, use the IDF updater and select the update.lst that you just created.

edit flag offensive delete link more
0

answered 2022-06-25 15:28:08 -0500

nickf's avatar

You can open command prompt and create a text file for the .lst with all the file paths to the .idf files for updating. Navigate to the location you want the .lst Entering the following command to create the .txt list of .idf files:

dir c:\Users\path_to_idf_files\*.idf /s /b >list.txt

Open the .txt in the location to confirm the paths were properly formatted. Change the name of the .txt to a .lst file using the rename feature. Open IDFVersionUpdater and search for .lst files to open in the previous location. Run it. I did this recently for about 120,000 .idf files. It takes a while to run that many through the updater.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2017-10-19 17:19:52 -0500

Seen: 1,242 times

Last updated: Jul 05 '23