6 Replies Latest reply on Jan 24, 2017 11:06 AM by gregor

    Recalc - Programatically in Datalink




      Wondering if the right click reclaculate Datalink functionality is exposed so that I could write code to recalculate and resize my array of datalink calls?




      Mark Bowles
      Process Innovations Inc

        • Re: Recalc - Programatically in Datalink
          Ahmad Fattahi

          You can use volatile functions in your arrays (or insert volatile functions artificially for recalculation purposes) and then recalculate the Excel spreadsheet.


          To see some more on the volatile functions and how you can use them in your PI DataLink arrays please see the user manual where it talks about "Triggered recalculation".


          To update a spreadsheet programmatically you can use ActiveSheet.Calculate in VBA or similar methods for other languages. To see more on this please refer to this page.

            • Re: Recalc - Programatically in Datalink

              Ok..understood.  I will check out the user manual.   I find it somewhat curious that this appears to not be a common concern as I have only run across a couple of references to it.  This is also hard to catch...it is inconsistent.  Sometime the entire array will return and sometimes not.....The sheet updates with Activesheet.Calculate and the various other flavors...but appears to do nothing to expand arrays of datalink calls.


              I will look into the Volatile excel date functionality and see if it will apply here.