With the combination of the startup command line parameters to launch PLAXIS and the commands runner in PLAXIS 2D and PLAXIS 3D, it is relatively easy to make a setup in order to run multiple calculations unattended.
Since PLAXIS 2D AE, the program also has the command line and the commands runner.To run a series of commands (stored in a command log file) after loading a PLAXIS 2D project (extension *.p2dx), the format of the command line for the Windows Console is:
"[PLAXIS 2D installation folder]\Plaxis2DXInput.exe" "[full path to Plaxis file]" "--run=[path to command file]"
Example:
"C:\Program Files\Plaxis\Plaxis 2D\Plaxis2DxInput.exe" "D:\Projects\Project1A.p2dx" "--run=D:\Projects\calculateprojects.log"
In order to launch a command file after loading a PLAXIS 3D project, the format of the command line is similar:
"[PLAXIS 3D installation folder]\Plaxis3DInput.exe" "[full path to Plaxis file]" "--run=[path to command file]"
"C:\Program Files\Plaxis\Plaxis 3D\Plaxis3DInput.exe" "D:\Projects\Project1A.p3d" "--run=D:\Projects\calculateprojects.p3dlog"
If you want to calculate multiple projects directly after each other, the simplest way to do this is to use such a commands log file and use a Batch-file (.bat) to run several calculations.
The commands log file will contain all the commands that will be run after loading the model. In this case, we will create this file ‘calculateprojects.log’, an ASCII file you can make with e.g. Notepad. It will contain the following instructions:
The commands that we need to store in this command log file ‘calculateprojects.log’ are:
gotostages calculate True save __kill
Note: if one of the commands in this does not work (e.g. when there is no mesh defined, the calculation cannot start and the program shows an error message), then the entire process is halted.
In order to launch an application, we can take advantage of the Windows shell. For this, we will use a BAT-file (you can edit this with any text editor, like Notepad). Make sure to give the file the extension .BAT
The content of this file to run four PLAXIS 2D calculations on these files stored in the folder D:\Projects is:
"C:\Program Files\Plaxis\Plaxis 2D\Plaxis2DxInput.exe" "D:\Projects\Project1A.p2dx" "--run=D:\Projects\calculateprojects.log" "C:\Program Files\Plaxis\Plaxis 2D\Plaxis2DxInput.exe" "D:\Projects\Project1B.p2dx" "--run=D:\Projects\calculateprojects.log" "C:\Program Files\Plaxis\Plaxis 2D\Plaxis2DxInput.exe" "D:\ProjectsProject1C.p2dx" "--run=D:\Projectscalculateprojects.log" "C:\Program Files\Plaxis\Plaxis 2D\Plaxis2DxInput.exe" "D:\ProjectsProject1D.p2dx" "--run=D:\Projectscalculateprojects.log"
Now we can just double click on the BAT-file to run all these calculations.
For a demonstration, please see our animation: Using a batch file to run commands
Note, this is a VIP feature: a licence with the VIP add-on is required to run the commands runner
Energy saving while running multiple calculations
[Tips and Tricks]
Practical use of the commands runner: using a batch file to run commands
[Videos]