[Closed] Get the current .max file name
Hi,
Is it possible to find the current .max file name ?
lets say i have a scene called “MyScene.max”
I search something that can return something like that :
“C:\3dsmax_scenes\MyScene.max”
Thanks,
Straight from the reference:
3ds Max System Globals3ds Max System Globals[left]maxFileName
[/left]
[left]Contains a String value that defines the file name for the currently open scene. This variable is read-only.
[/left]
[left]maxFilePath
[/left]
[left]Contains a String value that defines the directory path for the currently open scene. This variable is read-only.
[/left]
Also you should search the reference for “file name parsing”.
Hope this helps!
thanks its exactly what i was looking for
I searched the reference about 1 hour without finding anything :s i guess i didn’t look at the right location ^^
Did you look under Frequently Asked Questions?
“How do I get the file name of the current scene?”
[color=white]A user asked:[/color]
[left]I can’t seem to find a function for grabbing the name of the currently open maxfile!
[/left]
[color=white]Answer:[/color]
[left]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. Both variables are read-only!
[/left]
[left]To get the complete scene file name, you can use
[/left]
[left]EXAMPLE
[/left]
[left]
[/left]
[left]sceneName = maxFilePath + maxFileName
[/left]
[left]
[/left]
[left]
[/left]
[left]If the scene does not have a name yet (Untitled), both will return an empty string “”.
[/left]
[left]These global variables are documented under the letter M in the topic 3dsmaxSystemGlobals
[/left]
I’ve spent the last half hour looking for this too, so forgive me for this rant. The maxscript documentation is great, but whatever engine is powering the help is not!
Type in “max filename”, “scene filename” or “max filepath” into the Search window (those are the words I tried), and you will have a hard time finding what you search for. I find myself using the CGTalk search several times a day to find the exact keyword, and then returning to the Maxscript help to narrow down the search.
That’s true, unfortunately. Google it is not.
I am in the process of upgrading my hardware and software at home, and you have no idea what problems I am having getting RoboHelp to work on my new system.
At this point, it looks like the next version of the Help will be written on my 6 years old 32 bit machine because that’s the only place it works reliably. I am waiting to see if Adobe will be able to figure it out. But to be realistic, RoboHelp was written in the end of last millenium, then acquired by Macromedia, in turn acquired by Adobe, and the core of the software has barely changed. So it would require a complete switch to some other authoring tool (not gonna happen) to get better search.
For this specific case, I will try to add more links from related topics because the search returns the results you wanted as relevance #14 and #101 and that is unacceptable. I can also try to tweak the wording within the document to get the relevance higher. But I cannot do this for every topic because there are so many.
Oh well.
Thanks a lot for the reply Bobo. Sorry if I sounded overly negative, but it’s a bit frustrating to spend so much of the time trying to find the exact keyword. It feels like a weird psycho-wordgame at times.
I’m just guessing now, but is the chm format some sort of a compilation of HTML-files? Would it be possible to upload the original files to the web and let Google handle them?
CHM is Microsoft’s Compiled HTML format for help files. In fact, the search problems might be related to it, the main trouble with the authoring software is the keyword generation (I had to jump through hoops to make it work a bit better in the last couple of years).
The source of the Help files is property of Autodesk. What can and cannot be done with it is their call. I just write and deliver the documentation. The Main Max Help is authored with a different package, but it is not an option to switch for historical reasons. I have been asking for a Wiki-like online documentation for years (and I am not alone), but no luck so far.