Notifications
Clear all

[Closed] Not Able to make COM connection between Python – Max

Hi,
I am trying to make a COM connection between Python and Max,

code is simple,

import win32com.client
o = win32com.client.Dispatch(鈥淢AX.Application鈥?

but it keeps giving below error,
pywintypes.com_error: (-2147221005, 鈥業nvalid class string鈥? None, None)

I even tried to put specific version as MAX.Application.8, but no luck,

am I missing anything here?

Thanks

1 Reply

well, figured it out, finally,

had to add below key in registry, now its working smoothly,

HKEY_CLASSES_ROOT\MAX.Application.8 = OLE Automation MAX 8.0 Application
HKEY_CLASSES_ROOT\MAX.Application.8\Clsid = {7FA22CB1-D26F-11d0-B260-00A0240CEEA3}

HKEY_CLASSES_ROOT\CLSID{7FA22CB1-D26F-11d0-B260-00A0240CEEA3} = OLE Automation MAX 8.0 Application
HKEY_CLASSES_ROOT\CLSID{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\ProgID = MAX.Application.8
HKEY_CLASSES_ROOT\CLSID{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\VersionIndependentProgID = MAX.Application
HKEY_CLASSES_ROOT\CLSID{7FA22CB1-D26F-11d0-B260-00A0240CEEA3}\LocalServer32 = C:\Program Files\Autodesk\3dsMax8\3dsmax.exe

found this, over here,
http://forums.cgsociety.org/archive/index.php/t-342434.html