MAXScript FAQ > How do I get the file name of the current scene? |
The file name of the currently loaded scene can be accessed via the System Global Variable maxFileName.
The path of the current scene is accessible through maxFilePath.
To get the complete scene file name, you can use
If the scene does not have a name yet (Untitled), both will return an empty string "".
These global variables are documented under the letter M in the topic 3ds Max System Globals