I’ve worked with 3ds Max for a few years now but am very new to MaxScript and any automation and would be greatful for some advice.
All I’m trying to do is automate opening a max file, assigning an image to a material then rendering it. After looking into to it for quite a while I figured it would be the best solution to create this in C# and execute maxscript using ManagedServices.MaxscriptSDK.ExecuteMaxscriptCommand() (although I’m open to ideas if there’s a better solution) then package it up as an exe and run it standalone.
Heres the code I’ve been trying to get working
using System;
using Autodesk.Max;
using ManagedServices;
namespace ManagedServicesTest
{
class Program
{
static void Main(string[] args)
{
ManagedServices.MaxscriptSDK.ExecuteMaxscriptCommand("Render()");
}
}
}
I’m hoping it’s just something simple I’ve missed but I keep getting this error AccessViolationException was unhandled (see image below for more detail) any thoughts would be great.


it is pretty old, but somehow related to managedservices.dll