win32com problem
- From: cfriedalek@xxxxxxxxx
- Date: 24 Oct 2006 18:15:39 -0700
I'm interacting with a third party application using python and com.
However having problems and don't know what to look at next to resolve
the issue.
The app. can be driven by VBS. The following VBS code works:
Set Synergy = CreateObject("synergy.Synergy")
Synergy.OpenProject "D:/temp/project.mpi"
Synergy.Project.OpenItemByName "test_bar_3d_6l_pc1", "Study"
Set Tet = Synergy.StudyDoc.GetFirstTet()
While Not Tet Is Nothing
Str = Tet.ConvertToString() + " "
Set Tet = Synergy.StudyDoc.GetNextTet(Tet)
MsgBox Str
WEnd
This prints "TE1" "TE2" etc
The "same" code in python returns <COMObject <unknown>> with each call
to the GetNextTet method.
import win32com.client
from win32com.client import Dispatch
Synergy = win32com.client.Dispatch("synergy.Synergy")
Synergy.OpenProject("D:/temp/project.mpi")
Synergy.Project.OpenItemByName("test_bar_3d_6l_pc1", "Study")
tet = Synergy.StudyDoc.GetFirstTet
while tet:
print str(tet)
tet = Synergy.StudyDoc.GetNextTet(tet)
Any clues on what I'm doing wrong, or how to investigate whether there
is a bug in win32com or in the third party apps com implementation.
.
- Follow-Ups:
- Re: win32com problem - Problem Solved
- From: cfriedalek
- Re: win32com problem
- From: Gabriel Genellina
- Re: win32com problem
- From: Aries Sun
- Re: win32com problem
- From: Steve Holden
- Re: win32com problem - Problem Solved
- Prev by Date: Re: return tuple from C to python (extending python)
- Next by Date: Re: Ctypes Error: Why can't it find the DLL.
- Previous by thread: Re: return tuple from C to python (extending python)
- Next by thread: Re: win32com problem
- Index(es):
Relevant Pages
|