techartorg / MXSPyCOM

A modern version of MXSCOM, to allow for editing & execution of 3ds Max MaxScript and Python files from external code editors.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

COM Exception in Max 2024

daniFM opened this issue · comments

The tool is working for me in Max 2022 but not in 2024. It throws an exception every time I try to run an script.
I tried to debug it but I could not get past the error message:

Exception has occurred: CLR/System.Runtime.InteropServices.COMException
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in System.Private.CoreLib.dll: 'Unknown name. (0x80020006 (DISP_E_UNKNOWNNAME))'
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
   at MXSPyCOM.Program.execute_max_commands(String[] args, String filepath) in D:\MXSPyCOM\Program.cs:line 98
   at MXSPyCOM.Program.Main(String[] args) in D:\MXSPyCOM\Program.cs:line 440

I tried to check if com_obj was null, but that wasn't the case. So the only thing I can think of is that something in 3dsMax's COM API has changed.
Can anybody shed some more light into what could be happening here?