Scripting Aurora from the Command Line and PowerShell

Q:  Can I use Command Line and PowerShell to run Aurora?

Yes, users can run Aurora project files (.apz), Scheduler files (.xsf), or Script files using the command line. To run this, users can go to where the Aurora executable is located and then pass through certain parameters.  

The Aurora executable is located in the "C:\Program Files\Energy Exemplar" folder, under the specific Aurora version installed. For example,  the Aurora 14.1 executable is located under “C:\Program Files\Energy Exemplar\Aurora 14.1". For Aurora 13.4 and earlier, the executable is located under “C:\Program Files (x86)\AURORA”.

There are two possible parameters for the command line, the first is the parameter for either the project, script, or scheduler file. If a project file is passed through, the default behavior is to open the project in Aurora, but not to run it. To automatically run the project, the second parameter “/r” must be used. If a script or scheduler file is passed through, “/r” is not needed as it will automatically start the scheduler or script by default.

If running an Aurora project, once the simulation is completed, the Aurora instance will close.

Example to open and run an Aurora project through the Command Line:

cd “C:\Program Files\Energy Exemplar\Aurora 14.1" .\Aurora.exe /r "C:\AURORAxmp\US_Canada_DB_2019_v1\Alberta_Default_20190201.apz"

 

Example to open and run an Aurora script through the Command Line:

cd “C:\Program Files\Energy Exemplar\Aurora 14.1" .\Aurora.exe "C:\AURORAxmp\AuroraScriptExample.vb"

 

Example to open and run an Aurora Scheduler file through the Command Line:

cd “C:\Program Files\Energy Exemplar\Aurora 14.1" .\Aurora.exe "C:\AURORAxmp\AuroraSchedulerExample.xsf"

 

NOTE: You can also script the dbCompare tool to run using the Command Line Interface.

 

Using PowerShell

If users would like to script using Aurora through the Command Line, they can do so using Powershell.

Powershell Example File (.ps1):

#This example will open three instances of Aurora and run the three specified projects at the same time.

 cd "C:\Program Files\Energy Exemplar\Aurora 14.1"

.\Aurora.exe /r "C:\AURORAmp \US_Canada_DB_2019_v1\Alberta_Default_20190201.apz"

.\Aurora.exe /r "C:\ AURORAmp \US_Canada_DB_2019_v1\EastCanada_Default_20190201.apz"

.\Aurora.exe /r "C:\ AURORAmp \US_Canada_DB_2019_v1\ECSouth_Default_20190201.apz"

 

 FAQs

 Scripting Aurora from the Command Line and PowerShell


For further assistance, please contact Aurora Support.

Copyright© 1997-2024 Energy Exemplar LLC. All rights reserved.