[python-win32] Trouble Automating Alibre CAD package

Duane Kaufman duaneklean at tds.net
Sun Jul 9 16:27:34 CEST 2006


Hi,

Thanks Mark.

I know this isn't the (strictly) correct group to ask this, but does anyone know if ctypes has any more capabilities with regard to this problem?

Thanks,
Duane

> 
> From: "Mark Hammond" <mhammond at skippinet.com.au>
> Date: 2006/07/09 Sun AM 06:50:20 CDT
> To: <duanek at chorus.net>,  <python-win32 at python.org>
> Subject: RE: [python-win32] Trouble Automating Alibre CAD package
> 
> > When I try the same thing in a vbs script, and run with wscript:
> >
> >         Dim AlibreHook        AlibreHook = GetObject(,
> > "AlibreX.AutomationHook")
> >         Dim AlibreRoot        AlibreRoot = AlibreHook.Root
> >         WScript.Echo("Version " & AlibreRoot.version)
> >
> > I get the error:
> > Line: 4
> > Char: 9
> > Error: Object required
> > Code: 800A01A8
> > Source: Microsoft VBScript runtime error
> >
> > The TypeName(AlibreRoot) in the second example yields 'Unknown'
> >
> > All of the examples have this component started and attach to
> > a running instance with GetObject.
> >
> > Any new insights?
> 
> The above just confirms what Rodrigo mentions in the text quoted below:
> 
> > > I think trying to create the object using VBScript is a good idea.
> > > This way you will know who to blame (pywin or the component).
> > >
> > > ===ThisIsJustATestIWouldLikeToDoItInPython.vbs ===
> > > Dim x
> > > Set x = CreateObject ("AlibreX.AutomationHook")
> > > ===EOF==
> > >
> > > Does it work?
> > >
> > > I'm not 100% sure, but AFAIK VB doesn't need the IDispatch,
> > as far as
> > > the component provide a type library and oleautomation types.
> > >
> > > Mark: can dispatch-less objects be used from win32com?
> 
> The object doesn't support IDispatch, so win32com and VBScript can't use it.
> (ie, the answer to Rodrigo's question is "no")
> 
> Cheers,
> 
> Mark
> 




More information about the Python-win32 mailing list