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

How to use Command line

asked 2017-09-14 01:50:32 -0500

Elaheh gravatar image

updated 2017-09-14 03:28:19 -0500

I got some issues with running E+ from CMD. Lets say I wanna to run 5ZoneAirCooled.idf (as example file) . I tried different scripts but the process is always terminated!

Here is my script;

c:\>EnergyPlusV8-7-0\Epl-run c:\EnergyyPlusV8-7-0\Energy+.idd c:\EnergyPlusV8-7-0\ExampleFiles\5ZoneAirCooled c:\EnergyPlusV8-7-0\ExampleFiles\5ZoneAirCooled idf "C:\EnergyPlusV8-7-0\WeatherData\USA_VA_Sterling-Washington.Dulles.Intl.AP.724030_TMY3.epw" EP N nolimit N N 0 Y

and what I got after running the script:

c:\>IF "FALSE" == "FALSE" DEL Energy+.idd
Could Not Find c:\Energy+.idd

c:\>IF "FALSE" == "FALSE" DEL Energy+.ini
Could Not Find c:\Energy+.ini

c:\>goto :done

c:\>if EP == Y pause
edit retag flag offensive close merge delete


Please use existing (and relevant) tags. "how to use command line" isn't a good tag. Thanks!

Julien Marrec gravatar imageJulien Marrec ( 2017-09-14 02:47:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-14 03:00:24 -0500

updated 2017-09-14 03:33:38 -0500

I don't have a windows machine, so I'm not 100% sure the CLI is available on Windows or not, but I don't see any reason it wouldn't it's coded in C++ like the rest of E+ (

First, prior to v8.4 EnergyPlus uses to be run in command line using a batch file (the one you're using). This is no longer the case, and EnergyPlus now has a proper Command Line Interface (or 'cli'), which documentation can be found here.

If the energyplus isn't in your PATH, you'll need to use the full path (on mac that's /Applications/EnergyPlus-8-7-0/energyplus) or set your path correctly.

Display the help:

energyplus --help

Run a model test.idf in the current directory, with a weather file called weather.epw in the current directory as well, and output to a directory named out-test:

energyplus -w weather.epw -o out-test/ test.idf

By default it picks up the Energy+.idd from the same folder as where the energyplus executable is (so /Applications/EnergyPlus-8-7-0/Energy+.idd in my case). If you need to supply another one, use -i path_to_Energy+.idd (or --idd)

Obviously, all paths above can be made absolute if there aren't in current directory, or can be made relative. Here's a mixed example:

energyplus \
   --idd ~Software/Others/EnergyPlus-build/Products/Energy+.idd \ # Absolute path
   -w ../Weather/weather.epw \   # Relative path (one folder up, then inside Weather/)
   -d out-test/ \   # Current directory (relative path too)
   test.idf   # Current directory

If you really want to run Epl-run.bat, see the parameters its documentation here. If I decompose your query, I think the problem is that you're passing the idd as the first argument, when the first argument should be the input file without extension. The batch should will look for the .ini and .idd in the current directory.

c:\>EnergyPlusV8-7-0\Epl-run = Program to run
c:\EnergyyPlusV8-7-0\Energy+.idd = **Don't pass this!**
c:\EnergyPlusV8-7-0\ExampleFiles\5ZoneAirCooled = contains the file with full path and no extensions for input files
c:\EnergyPlusV8-7-0\ExampleFiles\5ZoneAirCooled = contains the file with full path and no extensions for output files
idf = extension of the input file
"C:\EnergyPlusV8-7-0\WeatherData\USA_VA_Sterling-Washington.Dulles.Intl.AP.724030_TMY3.epw" = contains the file with full path and extension for the weather file

EP = a weather file is used
N = no pause
nolimit = no 250 columns limit in readVarsESO
N = Don't call convertESOMTR
N = Don't call csvProc
0 = ??
Y = ??
edit flag offensive delete link more


Confirmed that it's present on windows too (src/EnergyPlus/CMakeLists.txt#L613)

Julien Marrec gravatar imageJulien Marrec ( 2017-09-14 03:22:58 -0500 )edit

Your Answer

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

Add Answer


Question Tools


Asked: 2017-09-14 01:50:32 -0500

Seen: 32 times

Last updated: Sep 14