3ds Max 2018 Help - Startup Script - Autodesk

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

8/25/2021 3ds Max 2018 Help | Startup Script | Autodesk

Startup Script

When 3ds Max first starts, MAXScript searches for any startup script files, which it then automatically loads and
runs.

This feature is useful if you have function libraries you always use and want preloaded, or if you want to establish
custom UI settings, define scripted plug-ins, or load scripted utility rollouts.

MAXScript first searches for MacroScript (MCR) files in the ui\macroscripts directory. These MacroScript
definitions are not compiled at this time; rather they are just scanned to identify the MacroScripts that have been
defined.

MAXScript next searches for MAXScript files (MS, MSE, and MZP) in the plug-in path directories (specified on the
Configure System Paths dialog and Configure User Paths dialog) and their subdirectories, and compiles these files.
The base scene and user interface have not been created at this point, so no viewport or scene commands should
be executed in these files. These files should primarily define scripted plug-ins and utility functions.

Any utility functions used by the macroScripts defined when reading the ui\macroscripts directory should be
defined in a .ms or .mse file in one of these directories. You can prevent a nested directory from being scanned by
placing its name in parentheses, for example "(old-versions)", allowing you to enable and disable scripts in handy
directory-based groupings.

At this point, 3ds Max creates the base scene and user interface. Any macro scripts used by buttons in the user
interface are compiled at this time.

The automatic loading of the following startup script files can be deactivated by turning off the Auto Start
MAXScript option in the MAXScript page of the Preferences dialog, as described in "MAXScript Preferences."

MAXScript first searches for a file named startup.ms in the following directories, in this order:

1. The Scripts directory (defined on the Configure User Paths dialog File I/O panel)
2. The Startup Scripts directory (defined on the Configure System Paths dialog)
3. The 3ds Max executable main directory
4. The Windows system directory (system32)
5. The Windows directory
6. The directories that are listed in the PATH environment variable

MAXScript stops searching when it finds the first occurrence of startup.ms.

MAXScript then recursively scans the Startup Scripts directory (defined on the Configure System Paths dialog) and
any nested directories for .ms, .mse, and .mzp script files and loads them. In this pass, any script files with the
name startup.ms are ignored. You can prevent a nested directory from being scanned by placing its name in
parentheses, for example "(old-versions)", allowing you to enable and disable scripts in handy directory-based
groupings.

If you specify a script to run in the command line (-U MAXScript script_name), the script is executed at this point.
(See the MAXScript Help topic “Running Scripts from the Command Line”).

Parent topic: Startup Files and Defaults

help.autodesk.com/view/3DSMAX/2018/ENU/?guid=GUID-C372E124-2B7E-41BB-94B0-5FF945D51095 1/2
8/25/2021 3ds Max 2018 Help | Startup Script | Autodesk

Except where otherwise noted, this work is licensed under a Creative Commons Attribution-
NonCommercial-ShareAlike 3.0 Unported License. Please see the Autodesk Creative Commons FAQ for
more information.
© 2021 Autodesk Inc. All rights reserved

help.autodesk.com/view/3DSMAX/2018/ENU/?guid=GUID-C372E124-2B7E-41BB-94B0-5FF945D51095 2/2

You might also like