Progress Check on a Ti via VBA (API)

Post Reply
MSidat
Community Contributor
Posts: 110
Joined: Thu Aug 26, 2010 7:41 am
OLAP Product: TM1, PA
Version: PAL 2.0.8
Excel Version: 2016
Location: North West England

Progress Check on a Ti via VBA (API)

Post 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
Always Open to Opportunities
Alan Kirk
Site Admin
Posts: 6667
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Progress Check on a Ti via VBA (API)

Post 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.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Progress Check on a Ti via VBA (API)

Post 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
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
MSidat
Community Contributor
Posts: 110
Joined: Thu Aug 26, 2010 7:41 am
OLAP Product: TM1, PA
Version: PAL 2.0.8
Excel Version: 2016
Location: North West England

Re: Progress Check on a Ti via VBA (API)

Post 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
Always Open to Opportunities
Post Reply