PDA

View Full Version : Help with max from command line


AdamMax
10-29-2010, 03:06 AM
Hi guys.

I'm trying to launch 3dsMax from the dos cmd line, open a specified file and export to a specified location.

From the cmd line, the following actually starts up max and opens the file I point it to, however it instantly shuts down max afterwords and does not export.

3dsmax.exe -mxs "loadMaxfile C:\\tmp\\testmax.max; exportFile c:\\tmp\\exportdir\\exported.3DS"

Even the following by itself shuts max down instantly after opening the file, which wouldn't be such a problem because I eventually want to shut down max after exporting, only that I think it's interrupting the export process.. maybe?

3dsmax.exe -mxs "loadMaxfile "C:\\tmp\\testmax.max"

I tested the export section in the listener and it exports a file just fine

exportFile "c:\\tmp\\exportdir\\exported.3DS"

Any help would be appreciated.
Regards,
Adam

Gravey
10-29-2010, 03:25 AM
you appear the be missing some quotes in your script string and i think using loadmaxfile is not nessesary unless you're planning on exporting from multiple files with the one max instance. try this:
3dsmax.exe "C:\\tmp\\testmax.max" -mxs "exportFile \"c:\\tmp\\exportdir\\exported.3DS\""also if you're running this from a batch file or by typing into a command prompt, you dont need the double \\ in your path strings.

AdamMax
10-29-2010, 04:01 AM
Awesome. Works perfectly.
Thanks Joel.
Hey, you live in Sydney can I buy you a beer?

Gravey
10-29-2010, 04:13 AM
yes you can! beer is good :)

AdamMax
10-29-2010, 04:55 AM
Near Glebe?

Gravey
10-29-2010, 04:59 AM
not really near Glebe. Getting a bit off topic, should take this to a PM. about to send you one now...

CGTalk Moderation
10-29-2010, 04:59 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.