Book a Demo

Author Topic: Slow execution of vbs  (Read 6992 times)

GTM

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Slow execution of vbs
« on: March 13, 2006, 02:59:15 pm »
I'm trying to use vbs via WSH for automation from the command line.
Code: [Select]

Dim Rep
set Rep = CreateObject("EA.Repository")

   ''create the repository object
   set rep = CreateObject("EA.Repository")

   ''open an EAP file
   rep.OpenFile("XXX.EAP")

   ''use the Repository in any way required
   DumpModel rep ' as in provided sample code

   ''close the repository and tidy up
   rep.Exit()
   set rep = Nothing

takes about 11 seconds to print out the first package name, and then takes another 5 seconds to close after printing out the last element name.
Is this normal behavior? Where is the delay coming from?
Would it be quicker from within VB or VB.net?

Takeshi K

  • EA User
  • **
  • Posts: 632
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: Slow execution of vbs
« Reply #1 on: March 13, 2006, 07:28:08 pm »
Hello,

EA is activeX automation server, so when you use Repository object,
EA.exe will start in the background.
(And after script is finished, EA.exe will be shut down.)

So, it will take seconds to start script, it depends on your machine power.

--
t-kouno
--
t-kouno

thomaskilian

  • Guest
Re: Slow execution of vbs
« Reply #2 on: March 14, 2006, 01:47:41 pm »
I'm using that with Perl. Startup takes 2-3 seconds - just as long as opening EA via dbl-click. Once it's up, automation is fast - even with Perl.

GTM

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Slow execution of vbs
« Reply #3 on: March 20, 2006, 02:46:57 pm »
Thanks for the infos. Looks like I need to buy new HW.
Sigh--

thomaskilian

  • Guest
Re: Slow execution of vbs
« Reply #4 on: March 21, 2006, 01:08:47 am »
Dont sigh because of new hardware. Be desperate because of the SW that comes with it ::)

GTM

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Slow execution of vbs
« Reply #5 on: April 02, 2006, 02:33:00 am »
Yep - got it working now.
Startup and shutdown now takes 3 seconds on a 1.7GHz intelM.
Question: Will EA execute all installed Add-in callbacks like
EA_FileOpen if used via Automation?

thomaskilian

  • Guest
Re: Slow execution of vbs
« Reply #6 on: April 02, 2006, 03:23:08 am »
Hmm. Why and how to use an add-in via automation? Add-ins are meant to be called from a human, aren't they?