Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Com exception in 3ds Max 2022 #21

Open
dlightme opened this issue May 9, 2022 · 4 comments
Open

Com exception in 3ds Max 2022 #21

dlightme opened this issue May 9, 2022 · 4 comments

Comments

@dlightme
Copy link

dlightme commented May 9, 2022

I'm trying to get the MXSPYCom server to execute scripts in 3ds Max 2022 (Python 3.7)
With initialize_COM_server in %appData%\Local\Autodesk\3dsMax\2022 - 64bit\ENU\scripts\startup launching from PyCharm, Notepad++ or cmd results in

C:\Users\xxxxx\MXSPyCOM>MXSPyCOM.exe -f "C:\test.py"
Unhandled exception. System.Runtime.InteropServices.COMException (0x80020006): 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 MXSPyCOM.Program.execute_max_commands(String[] args, String filepath)
at MXSPyCOM.Program.Main(String[] args)

I've tried every variation of pathnames (single, double, no quotes, /, //, \ ) it's always the same result.
Is this compatible with 3ds Max 2022?

@JeffHanna
Copy link
Collaborator

Do you have safe script execution enabled? Sadly, at this time, you have to disable that for MXSPyCOM to work correctly.

@dlightme
Copy link
Author

3ds max safe scene script execution was on, turned off, restart and same result. 0x80020006. Max 2022.3 Update (24.3.0.3404)

@Sugz
Copy link

Sugz commented Nov 7, 2022

I have the same problem, deactivating safe script execution didn't change anything. Max 2022.3.6 Security Fix (24.3.6.3521). Is there a solution now ?

@daniFM
Copy link

daniFM commented Nov 21, 2023

I'm having the same issue in Max 2024, but I didn't have the error in Max 2022 weirdly enough. Has anyone figured out a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants