open .max file in a command line console app

 
 
 
Posted by:papaburger
Data created:10 June 2010

I am trying to create a batch tool to open many .max files one by one and extract information from each .max files. 

I am quite new to C# , but in maxscript I will just use openFile command to open each file, but that will require me to run 3ds max .

Is it possible to develop batch app using Max.Net ?

Hi Danny,

Yes, it sounds quite possible. I would create a normal console app, then use System.Diagnostics.Process class to launch 3dsmax. I'd make sure the Max.NET has remoting enabled and then after the launch is done I'd connect to the 3dsmax instance using remoting, load the scene using IInterface.LoadFromFile(...), extract any data from it, then open another scene and/or close 3dsmax (by terminating your Process).

If you already have 3dsmax opened manually you can skip the step of loading it with Process, connecting to it etc.. You can find out more about remoting, connecting to 3dsmax that way, and extracting data in this video tutorial (it is pretty old but still applies, just use Autodesk.Max.dll instead of Interfaces.dll).

Hope this helps!

Marsel Khadiyev (Software Developer, EPHERE Inc.)