Search code examples
3dsmaxmaxscript

Manipulating 3ds max from a command-line


I want to control 3ds max from a command-line. The problem is that every time I run it through cmd it opens a new instance. Is there any possibility to manipulate working instance of the program through the command-line?


Solution

  • renato, Johan hello.

    Does it have to be Python? If you were to do this via a dotnet, it would be a simple matter of referencing managedservices.dll and calling the executeIntMaxscriptQuery function.

    In maxscript it would be like this but it would be not much different in C#

    (dotnetclass "managedservices.maxscriptSDK").ExecuteIntMaxscriptQuery "HardWareLockID"
    

    Im just finding my feet with Python, but if you were using Iron Python you would be able to use the managedservices.dll too if i'm not mistaken.