Updated 3ds Max Batch - 1

By Nicolas Holst - 8 Dec, 2017 - 3ds Max

In 3ds max 2018 Update 4 we've revamped how 3ds Max Batch works, where previously it was using the -batch flag now it's the maxbatch.exe executable.

The areas that we've changed are (for the detailed explanation please see Using 3ds Max Batch in the online help).

1. New options to pass data to the script:

mxsString to pass a string to the script
mxsValue to pass the result of evaluating the string to the script

2. Clearer error codes and logging:

-v verbosity
-listenerlog file to use for listener output
-log file to use for script error and exceptions


3. More options to control 3ds Max Batch:

-dateFormat  date format
-timeFormat  time format
-i 3dsmax.ini file to use
-p plugin.ini to use
-dm use the dialog monitor
-sceneFile  scene file to open before the script is run

So with that we go into a simple example: similar to a post from years ago (https://area.autodesk.com/blogs/max-station/nh7_using_backburner_to_automate_tasks_other_than_rendering_part_2/) I want to add some geometry to my scene files.
The difference is that this time I'm not submitting this via Backburner (that's for another post), I'll create two version, one Maxscript and one in python and I'll try to make the most of the new options that are available.

Command lines:

  • 3dsmaxbatch.exe add_a_box.ms -mxsString filename:"//fara06253/backburner/test.max" boxname:"test_ms" -log "c:\Temp\max_ms.log"
  • 3dsmaxbatch.exe add_a_box.py -mxsString filename:"//fara06253/backburner/test.max" boxname:"test_py" -log "c:\Temp\max_py.log"

I'm passing the filename in the filename mxsString and the name for the box that will be created in the boxname mxsString.
The reason I'm passing the filename is that I want to be able to save it under another name by adding a postfix to the name. If I'd just wanted to save it under the same name I could have used the command line parameter -sceneFile.
Note that I'm using forward slashes as that's a lot less confusing than trying to escape back slashes (check the number of back slashes in the original post!). Finally I'm writing the output to a specific log file so that I could parse that in case I need to get hold of some information.

You can use echo %ERRORLEVEL% to print the result of the 3dsmaxbatch executable, if all went fine it'll be 0.

So where are the scripts?
The Maxscript one is Updated 3ds Max Batch - 2 and the python one is Updated 3ds Max Batch -3.








Posted By
Published In
  • 3ds Max
  • Film & VFX
  • Games
  • Design Visualization
1 Comment
To post a comment please login or register
superrune | 1 month ago
This looks awesome!