Automation of Maxsurf Using Python

I am trying to automate Maxsurf using Python. My code in Python is as follows-

import win32com.client as win32
msApp = win32.Dispatch("BentleyModeler.Application")
FileName = "MonoHull.msd"
msApp.Design.Open FileName,False,False

While executing, I get the following error. What is the remedy here? And why do I get the list of objects (as en excel vba) in python?

C:\Users\USER\PycharmProjects\VBA\venv\Scripts\python.exe C:/Users/USER/PycharmProjects/VBA/main.py
File "C:\Users\USER\PycharmProjects\VBA\main.py", line 4
msApp.Design.Open FileName,False,False
^^^^^^^^
SyntaxError: invalid syntax

Parents Reply Children
No Data