Hi, I have a question regarding PI DataLink, is there an option to automatically refresh the Values of a Cell every few seconds ?
More recent versions now have Automatic Update buttons to initiate automatic updates on PI DataLink functions!
Please look for this icon! (Mine is in Korean but the icon is the same)
Also settings have the automatic update interval.The default setting is 0 seconds which means that you let Datalink figure out the right frequency.
You can use VBA code and use Microsoft Excel VBA function Application.Calculate or Application.CalculateFull. Calling Application.Calculate in VBA is equivalent to pressing the F9 key, and calling Application.CalculateFull is equivalent to pressing Ctrl+Alt+Shift+F9.
Private Sub CommandButton1_Click()Application.CalculateFull ‘or Application.Calculate
See https://techsupport.osisoft.com/Troubleshooting/KB/388OSI8 for more details.
Then, you can either incorporate the macro into a button or using Application.OnTime to run it every x amount of time.
Application.OnTime to run it every x amount of time.
Gabriel Michaud-Verreault mentioned Application.OnTime to run the macro, which I have used to good effect. Be sure to add code into Workbook_BeforeClose to stop the refresh or it will continue to fire after the spreadsheet is closed..
In case anyone is wondering, the LiveLibrary documentation discusses automatic updates here.
Retrieving data ...