PDA

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


bmlokesh
12-26-2007, 06: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

scorpion007
12-26-2007, 06:31 AM
Use max file open

openfile opens a data file for manipulation.

bmlokesh
12-26-2007, 07: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

ypuech
12-26-2007, 07:52 AM
Use loadMaxFile(). Look at the method documentation in the Reference.

MoonDoggie
12-26-2007, 07: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.

mir-vadim
12-27-2007, 11:26 AM
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:\test.max"

CGTalk Moderation
12-27-2007, 11:26 AM
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.