PDA

View Full Version : Not Able to make COM connection between Python - Max


vishangshah
10-21-2008, 08:12 AM
Hi,
I am trying to make a COM connection between Python and Max,

code is simple,

import win32com.client
o = win32com.client.Dispatch("MAX.Application")

but it keeps giving below error,
pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)

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

am I missing anything here?

Thanks

vishangshah
10-21-2008, 12:21 PM
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

:)

CGTalk Moderation
10-21-2008, 12:21 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.