MXPyCOM problem


I encountered this problem, but even debugging the solution I cannot find what is causing it.

Unhandled Exception: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {7FA22CB1-D26F-11D0-B260-00A0240CEEA3} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Activator.CreateInstance(Type type)
   at MXSPyCOM.Program.execute_max_commands(String[] args, String filepath)
   at MXSPyCOM.Program.Main(String[] args)

Do you know anything about this?
Thanks anyway



Are you using the prerelease MXSPyCOM (v1.1)? If so you’ll need to have the .NET Core 3.0 Preview installed. If you don’t want to help test the newest version I’d suggest you use the 1.0.1 release.


Hi Jeff , yes I am using the v1.1, as this problem is not a big problem for me right now, I will test using .net core preview and I will let you know.


I tested this on 3 machine, my laptop , my work pc and my own pc
For the first two everything worked perfectly
On my pc I have this problem.
So I reinstalled the mxspycom , the release one, this time and I removed manually the class register in the registry file.
Now opening max the registry is written again but executing the script I still have this problem
What I am missing?


Debugging the app I found that actually, the problem came from here.

The registry is correctly written and I don’t get why this should not work.
Any suggestion?


I found the problem…
I never worked with COM so I do not understand why.
Practically if 3dsMax is run as administrator,
MXSPyCOM need to be run as admin as well
Thanks anyway for the help, maybe this could be added in the documentation


Thanks for finding that. Sorry for the troubles. I’m curious, why must you run 3ds Max as Admin?


I honestly don’t remember why, I was working on a creation of some plugin months ago…
I think it was because I could not write file in c:/program files/… or some other administrator folder
No problem anyway , glad this could help someone else