Notifications
Clear all

[Closed] Can I open a file from mxs ???

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

5 Replies

Use

max file open

openfile opens a data file for manipulation.

1 Reply
(@bmlokesh)
Joined: 10 months ago

Posts: 0

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

Use loadMaxFile(). Look at the method documentation in the Reference.

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.

Hi,
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.
eg.

shellLaunch (getdir #maxroot + "3dsmax.exe") "c:	est.max"