Using Legacy 3ds Max Batch

This topic covers the version of 3ds Max Batch included in 3ds Max 2018.2 and 2018.3 Updates. In those versions, batch mode was invoked by passing the -batch flag to 3dsmax.exe. As of 3ds Max 2018.4 Update, 3ds Max Batch is a stand-alone executable, and includes many more options.

To start using 3ds Max Batch, do the following:
  1. Open a command prompt window.
  2. Change directory to the location where 3ds Max is installed. The default is C:\Program Files\Autodesk\3ds Max <version#>.
  3. Enter the following:

    start /wait 3dsmax.exe -batch [-mxs <mxs_commands>] [-U MAXScript | PythonHost <script_file>] [max_file]

    .

  4. 3ds Max starts in silent mode and loads the max_file if one is provided. It executes the script_file if one is provided, and executes the mxs_commands if any are provided. It then exits.

Debugging scripts

To find and fix errors in batch processing scripts, you can first run the script in 3ds Max. Once the script is working correctly, you can run it in 3ds Max Batch. There are two main logs that provide useful information when running scripts:
  • The MAXScript Listener Log captures your entered text and all printed output in a text file.
  • The 3ds Max Session Log captures your session to %LOCALAPPDATA%3dsMax\<version#>-64bit\<lang>\network\Max.log by default. You can customize the file path using the -log command line option.
Note: We recommend you always turn on the Listener Log to benefit from the script execution output for information and debugging purposes.

Exit codes

Command Description
0 Process exited normally. Identical to the stdlib value to EXIT_SUCCESS.
1 Process exited abnormally. Similar to the stdlib value for EXIT_FAILURE.
-1 Unhandled exception.
-2 Execution aborted by 3ds Max Batch.
-3 Unhandled exception while processing the WM_CLOSE window message.
-4 Unhandled exception while processing the WM_DESTROY window message.
-8 License Error. Could not obtain a valid license.
-9 Could not create the application.