Book a Demo

Author Topic: How to check if EA is completely started  (Read 3258 times)

supaklass

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
How to check if EA is completely started
« on: August 02, 2007, 01:09:50 am »
I am working on opening EA diagrams directly by clicking at Word hyperlinks. Hereby EA is started by the VB Shell() command to prevent closing after the script has finished executing. After the shell command I get the application object as usual by GetObject() and open an (SQL) repository:

 Shell(EAPath, AppWinStyle.MaximizedFocus, False)
 EAApp = GetObject(, "EA.App")
 EAApp.Repository.OpenFile( /* MyFile */)

Unfortunately I get an error at the OpenFile statement (the SQL repository can't be opened). The reason in obviously, that the shell command needs some time until EA is completely running. When I wait some seconds before I proceed with GetObject() everything works fine.

Now my question is: How can I check in the script, if EA is completely running an ready to receive commands by the automation interface?

Thanks,

Robert