Executing Python scripts from the command line

To execute a .py script from the command line:

  1. Open a Command Prompt window.
  2. Navigate to your 3ds Max root directory, if this directory is not in your PATH statement.
  3. Type 3dsmax to start 3ds Max and add the -U PythonHost command line switch, for example as follows: 3dsmax -U PythonHost demoBentCylinder.py

    Note See Executing Python from MAXScript for a list of directories under which 3ds Max will look for the .py file.