[python-win32] Calling Methods of an object returned by an COMObject method

Andreas Merl andreas.merl at nxp.com
Thu Sep 19 13:51:13 EDT 2019


Hello,

I am trying to automate CST Studio.

First part is straight forward:

Call

cst = win32com.client.gencache.EnsureDispatch("CSTSTudio.Application")

and get the CST Studio

next step open a new microwave studio project

mws = cst.NewMWS()



now there comes the problem:

mws has couple of methods.

As example “Quit()”

When I try to call this method nothing happens

mws.Quit()

It should quit the project.

What happens:

Nothing



But when I try to get a property

Example:

mws.Pi

Result:

3.141592653589793



For me it looks as the methods of mws are never called.



What am I missing?

Thanks for your Help

Best regards

Andreas Merl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20190919/91acf5bc/attachment.html>


More information about the python-win32 mailing list