View Full Version : Can I open a file from mxs ???

12 December 2007, 07:14 AM
HI all
I searched the forum for my question could not find fairly satisfactory result

So here is my question If I try to open a max file through max script listener

openfile "C:\Documents and Settings\vizuser\Desktop\5star_00.max"

listener outputs the same filepath as string

<File:C:\Documents and Settings\vizuser\Desktop\5star_00.max>

but I want the max file to be opened for editting in scene

HOW can I do this happen
thanks in advance

12 December 2007, 07:31 AM
Use max file open

openfile opens a data file for manipulation.

12 December 2007, 08:47 AM
Use max file open

openfile opens a data file for manipulation.

This is the max interface method of opening the file
But I want to open a file through max script as we do by double clicking on a max file in exporter

However thanks for the reply

12 December 2007, 08:52 AM
Use loadMaxFile(). Look at the method documentation in the Reference.

12 December 2007, 08:17 PM
when you are using the openFile function, you are actually opening the file as read-only text default mode:"rt" when you want to load the maxfile. Check Ypuech's suggestion.

12 December 2007, 12:26 PM
try to use this method
shellLaunch (getdir #maxroot + "3dsmax.exe") (maxFilePath + maxFilename)
in this case 3dsmax will open opened scene in new 3dsmax.
Use different path instead (maxFilePath + maxFilename) to open scenes which You want.
shellLaunch (getdir #maxroot + "3dsmax.exe") "c:\test.max"

CGTalk Moderation
12 December 2007, 12:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.