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("s ynergy.Synergy" )
Synergy.OpenPro ject "D:/temp/project.mpi"
Synergy.Project .OpenItemByName "test_bar_3d_6l _pc1", "Study"
Set Tet = Synergy.StudyDo c.GetFirstTet()
While Not Tet Is Nothing
Str = Tet.ConvertToSt ring() + " "
Set Tet = Synergy.StudyDo c.GetNextTet(Te t)
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("syne rgy.Synergy")
Synergy.OpenPro ject("D:/temp/project.mpi")
Synergy.Project .OpenItemByName ("test_bar_3d_6 l_pc1", "Study")
tet = Synergy.StudyDo c.GetFirstTet
while tet:
print str(tet)
tet = Synergy.StudyDo c.GetNextTet(te t)
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.
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("s ynergy.Synergy" )
Synergy.OpenPro ject "D:/temp/project.mpi"
Synergy.Project .OpenItemByName "test_bar_3d_6l _pc1", "Study"
Set Tet = Synergy.StudyDo c.GetFirstTet()
While Not Tet Is Nothing
Str = Tet.ConvertToSt ring() + " "
Set Tet = Synergy.StudyDo c.GetNextTet(Te t)
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("syne rgy.Synergy")
Synergy.OpenPro ject("D:/temp/project.mpi")
Synergy.Project .OpenItemByName ("test_bar_3d_6 l_pc1", "Study")
tet = Synergy.StudyDo c.GetFirstTet
while tet:
print str(tet)
tet = Synergy.StudyDo c.GetNextTet(te t)
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.
Comment