Page 1 of 1
Progress Check on a Ti via VBA (API)
Posted: Mon Jul 11, 2011 10:29 am
by MSidat
Hi All,
I have a Excel based process that kicks of a TI and dependant on the datasource and the user the TI that gets kicked off via VBA could take anything between 2 - 40 seconds. If its longer than 9/10 seconds Excel as always tends to be freeze and looks like it may have crashed, when in fact it is just awaiting the TI to finish.
Is anyone aware of a method to kick off a TI but enable the VBA code to continue running whilst the TI is still running? This will allow me to continually check for unlocked ascii file whilst updating a progress bar for the user.
Thanks in advance
Regards
Re: Progress Check on a Ti via VBA (API)
Posted: Mon Jul 11, 2011 11:49 am
by Alan Kirk
MSidat wrote:
I have a Excel based process that kicks of a TI and dependant on the datasource and the user the TI that gets kicked off via VBA could take anything between 2 - 40 seconds. If its longer than 9/10 seconds Excel as always tends to be freeze and looks like it may have crashed, when in fact it is just awaiting the TI to finish.
Is anyone aware of a method to kick off a TI but enable the VBA code to continue running whilst the TI is still running? This will allow me to continually check for unlocked ascii file whilst updating a progress bar for the user.
To be honest I'm not sure that a progress bar as such would be all that helpful since you have no way of being certain how long the TI will actually take, as you've said. However if all you want to do is avoid the apparent freeze one possibility would be to not run the TI execution code directly, but instead use the Shell command to run the
TM1RunTI.exe application asynchronously. That way your VBA code can keep refreshing the screen until it detects that the process has finished, avoiding the "blank stare" effect.
Re: Progress Check on a Ti via VBA (API)
Posted: Mon Jul 11, 2011 9:12 pm
by Martin Ryan
An alternative is to send the user to a "Wait" sheet which tells them the process is running and once it completes, returns them to the worksheet they were on. It doesn't stop the freeze, but it stops most users from clicking around especially once they're used to it.
Martin
Re: Progress Check on a Ti via VBA (API)
Posted: Tue Jul 12, 2011 12:19 pm
by MSidat
Thanks guys.
I have used the TM1RunTI.exe and it works a treat. Rather than show a progress bar after that just showed a Processing Message with the time is has taken thus far in seconds with a max time of 90 seconds.
Its informative yet comforts the user knowing something is still happening