Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Emre CETIN via python-win32
Hello again, Finally I got it to work! Here it is: import win32com.client srf = win32com.client.gencache.EnsureDispatch('Surfer.Application') Plot = srf.Documents.Add(1) srf.Visible = True MapFrame1 = Plot.Shapes.AddImageMap(GridFileName="C:/test.grd") ImageLayer1 = MapFrame1.Overlays(1) ImageMap1

Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Emre CETIN via python-win32
Hi again, I solved the unexpected error I just posted by following this link: https://mail.python.org/pipermail/python-list/2008-July/509467.html There is said to: "Just in case, could you delete the contents of your gen_py directory (probably in %TEMP%\gen_py)"That did it. Now I was able to test

Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Tim Roberts
Emre CETIN wrote: > > Finally I got it to work! Here it is: > > |importwin32com.client srf > =win32com.client.gencache.EnsureDispatch('Surfer.Application')Plot=srf.Documents.Add(1)srf.Visible=TrueMapFrame1=Plot.Shapes.AddImageMap(GridFileName="C:/test.grd")ImageLayer1=MapFrame1.Overlays(1)ImageMap1

Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Emre CETIN via python-win32
Thank you for your reply. I wanted to try it but for seom reason the code that has been running without a problem suddenly gave this error: import win32com.client srf = win32com.client.gencache.EnsureDispatch('Surfer.Application')  # after this line of code the error below is produced... -

Re: [python-win32] COM Automation: Problem Accessing Property of Object

2018-05-22 Thread Tim Roberts
Emre CETIN via python-win32 wrote: > Hi, I've been looking for a solution to this question for some time > now. Hopefully you could help me out. There's a program (Golden > Software Surfer) that I have successfully automated using Python COM. > I normally am able to control every portion I need. Th