Have you looked into the Update function provided in PI DataLink 2010 (that was introduced in PI DataLink 4.1)?
In the datalink 4.1 we have an auto-update function that works well but we need click in the button to start.
I need a feature that starts an update of the data when the excel starts in the sub workbook_open() because i don't want that the user needs to click in the auto-update button. I tried to start the PI auto-update function with the VB but I couldn't and the support tell me that it is not possible.
I think that the solution that i was used is the best solution but I want know if exist another solution.
I had a similar use for an automated update every 60 seconds, starting from opening the spreadsheet. I solved it with;
Private Sub Workbook_Open()
' The timer routine is atarted when the sheet is opened, and runs for the 60 seconds, after
' which it runs the subroutine above, which again calls the timer routine and it starts
' all over again.
Application.OnTime EarliestTime:=TimeValue(Now() + TimeSerial(0, 0, 60)), procedure:="RunAll", schedule:=True
I used the same idea and work very well. I will use this solution in the other spreadsheets.
The support could put this code in the documentation and help another users