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

Revision history [back]

I found out how to do this and it depends on which version of EnergyPlus you're using.

Like @David Goldwasser said, if you're using the EnergyPlus CLI in more recent versions, CLI will look for the IDD in the current working directory. You can place the .idd file in blob storage for the Job you're making. In this case each Task of the Job already has access to whatever is placed in blob storage via its working directory. In other words, what you place in the Blob of the Job will automatically be in each tasks working directory, so you only need to upload the IDD once. And, you don't need to specify the path to the IDD. This Task command would work fine:

"cmd /c "%AZ_BATCH_APP_PACKAGE_EnergyPlus#9.0.1%\\EnergyPlusV9-0-1\\energyplus -w in.epw -r 5ZoneAirCooled.idf"

In E+ versions that don't have the CLI, like 8.1.0, the one we're using, it's trickier. The .ini file in the EnergyPlus application folder MUST contain an Azure Applications path to the IDD that is supposed to be used. Ours was set to "C:\EnergyPlusV8-1-0\". Obviously in the Azure environment it's not possible to get to that drive and EnergyPlus isn't there anyway.

You need to alter the .ini file FIRST, and THEN upload the application package to Azure. INI contents look like:

[program]
dir=.
[BasementGHT]
dir=PreProcess\GrndTempCalc
[SlabGHT]
dir=PreProcess\GrndTempCalc

The key thing is the "dir=." part. This makes E+ look for the IDD in the current working directory. This will make it behave like the EnergyPlus CLI.

After that, you can invoke energy plus with the RunEPlus.bat script, after changing the program_path variable.

set program_path="%AZ_BATCH_APP_PACKAGE_EnergyPlus#8.1.0%\EnergyPlusV8-1-0\"

Alter the simulation_name variable and anything else as necessary as well.