com: makepy gencache.EnsureModule

K

Kai Rosenthal

Hello,

I' having a problem with gencache.EnsureModule:

I used win32com\client\makepy.py to successfully generate Python
sources.
Unfortunately, after I call win32com.client.Dispatch(), the object I
get back is of type "COMObject" instead of one of the generated
classes.

In particular, I'm trying to interact with SolidWorks Extensibility
Type Library and the PROGID is "SldWorks.Application".

Using win32com\client\makepy.py -i
SolidWorks Extensibility Type Library
{801A0000-A66C-11D3-A8BD-0000861EBBD6}, lcid=0, major=1, minor=00, 1, 0)

Looking in win32com\gen-py, the appropriate file _does_ exist:
801A0000-A66C-11D3-A8BD-0000861EBBD6x0x1x0.py
and it does contain the correct class definitions.

Then, in my code:<COMObject SldWorks.Application>

Why are the object mod is None and the object ob is <COMObject
SldWorks.Application> instead <win32com.gen_py.<blah>>?
Any bright ideas as to what's going wrong here?

Thanks for your hints, Kai
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top