How do I hook into Win32COM Notifications?

William Wicker at
Mon Mar 20 19:40:30 CET 2000

I'm playing with Python as a scripting language for SolidWorks, a 3D
CAD program. Solidworks has a COM interface for VBx that Python hooks
into quite well.

As part of the COM interface, SolidWorks exposes some notifications
that signal certain events of interest (file about to save, etc.).
Looking through the pygen type library code shows me some commented
out 'function prototypes' that look like they hook onto these

I don't completely (at all) understand how I can take advantage of
this, though. Modifying the pygen-created file seems like an
extraordinarily bad idea. The object hierarchy uses a class - coclass
design that is also strange to me.

Any suggestions? Pointers to documentation cheerfully accepted.
I've already read through the Python Win32 book and attempted to study
the Microsoft COM documentation (vols 1 & 2).


More information about the Python-list mailing list