MAXScript: getMaxFileVersionData always returns "undefined"!

MAXScript: getMaxFileVersionData always returns "undefined"!

Phil_Morgan
Enthusiast Enthusiast
671 Views
5 Replies
Message 1 of 6

MAXScript: getMaxFileVersionData always returns "undefined"!

Phil_Morgan
Enthusiast
Enthusiast

The getMaxFileVersionData command always returns "undefined". Why?
I tried to save a file from different versions 2020-2025, but when using the command getMaxFileVersionData "C:\\my_file.max" I always get "undefined", although the documentation says that I should get an array with the original version of the file and the version in which it was saved (https://help.autodesk.com/view/MAXDEV/2024/ENU/?guid=GUID-F693FDB5-1B1B-4A4D-9C48-ECF91272FD88). How to make the command getMaxFileVersionData work correctly?

0 Likes
Accepted solutions (1)
672 Views
5 Replies
Replies (5)
Message 2 of 6

denisT.MaxDoctor
Advisor
Advisor

link an example file... we will check

 

Most likely, the file you are trying to open does not exist in the specified path, or the path itself is specified with incorrect syntax.

Message 3 of 6

Phil_Morgan
Enthusiast
Enthusiast

It's just an empty file. The file exists and the path to it is specified exactly.
file_2.png

0 Likes
Message 4 of 6

Phil_Morgan
Enthusiast
Enthusiast

Here is this file (3dsmax 2024).
I tried running this command both in the MXS Listener window and from the script editor (Cntrl+E) - the result is the same: undefined

0 Likes
Message 5 of 6

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

the wrong syntax as I expected...

it must be 

 

@"J:\TEST\test.max" 
-- or 
"J:\\TEST\\test.max" 
-- or 
"J:/Test/test.max"

 

"\t" is a tab char 

 

 

Message 6 of 6

Phil_Morgan
Enthusiast
Enthusiast
Exactly! This is my mistake 😞
Thank you very much, Denis!
0 Likes