3ds Max System Directories

The following methods allow you to access the 3ds Max system directories:

GetDir <filetype_name>

Returns as a string the directory specified in the Customize > Configure Paths dialog for the specified file type. The valid <filetype_name> values are:

new.gif #animations

new.gif #archives

#autoback

#defaults

new.gif #downloads

#drivers

#export

#expression

#font

#help

#image

#import

#matlib

new.gif #maxData

#maxroot

#maxstart

new.gif #Photometric

#plugcfg

#preview

new.gif #proxies

new.gif #renderassets

new.gif #renderPresets

new.gif #renderoutput

#scene

#scripts

#sound

#startupScripts

new.gif #temp

#ui

new.gif #userMacros

new.gif #userScripts

new.gif #userStartupScripts

new.gif #userIcons

#vpost

new.gif NEW in 3ds Max 9: Directory names marked with new.gif are new.

 

SetDir <filetype_name> <string>

Sets the directory specified in string. Replicated in the Customize > Configure Paths dialog for the specified file type.

The valid <filetype_name> values are the same as for GetDir.

Returns true if successful, false if not. Does not check to see if <string> is a valid path. Any change made through this function is immediately reflected in the 3dsmax.ini file and so is persistent. Use with caution.

ConvertDirIDToInt <filetype_name>

new.gif NEW in 3ds Max 9: Returns an Integer corresponding to the given system directory name:

Int

Name

Int

Name

Int

Name

0

#font

12

#drivers

24

#Photometric

1

#Scene

13

#autoback

25

#renderassets

2

#import

14

#matlib

26

#userScripts

3

#export

15

#scripts

27

#userMacros

4

#help

16

#startupScripts

28

#userStartupScripts

5

#expression

17

#defaults

29

#temp

6

#preview

18

#renderPresets

30

#userIcons

7

#image

19

#ui

31

#maxData

8

#Sound

20

#maxroot

32

 

9

#plugcfg

21

#renderoutput

33

#downloads

10

#maxstart

22

#animations

34

#proxies

11

#vpost

23

#archives

 

 

 

The following methods let you get, add or delete Bitmap and XRef paths, corresponding to the Bitmaps and XRefs tabs in the Configure Paths dialog in 3ds Max. Any changes made through these functions are immediately reflected in the 3dsmax.ini file and so are persistent.

Map Path Methods:

mapPaths.add <path_string>

Appends the specified path to the list of Bitmap search paths.

mapPaths.count()

Returns the number of Bitmap search paths defined.

mapPaths.get <index>

Returns the indexed Bitmap search path as a string. The index is 1-based.

mapPaths.delete() <index>

Deletes the indexed Bitmap search path. The index is 1-based.

mapPaths.getFullFilePath <filename>

new.gif NEW in 3ds Max 9: Resolves the filename using map paths, returns fully qualified filename if the file is found

Example:

mapPaths.getFullFilePath "fir.tga"

Xref Path Methods:

xrefPaths.add <path_string>

Appends the specified path to the list of XRef search paths.

xrefPaths.count()

Returns the number of XRef search paths defined.

xrefPaths.get <index>

Returns the indexed XRef search path as a string. The index is 1-based.

xrefPaths.delete <index>

Deletes the indexed XRef search path. The index is 1-based.

xrefPaths.getFullFilePath <filename>

new.gif NEW in 3ds Max 9: Resolves the filename using xref paths, returns fully qualified filename if the file is found

Example:

xrefPaths.getFullFilePath "delme.max"

See also

pathConfig Struct

pluginPaths Struct