5 Replies Latest reply on Apr 16, 2009 9:27 PM by RJKSolutions

    Datalink 4.1 Beta - Updates method?

      Is it possible to programmatically ensure PI updates are enabled for a workbook? Like the old dlresize method.

        • Re: Datalink 4.1 Beta - Updates method?
          andreas

          Hi Rhys,

           

          I assume you want to use VBA to access the "Update" button on the ribbon? The right place to ask questions regarding the DataLink 4.1 beta would be betadatalink@osisoft.com.

           

          However, I have asked them to take a look at this post.

           

          regards,

          • Re: Datalink 4.1 Beta - Updates method?
            jlakumb

            Hi Rhys,

             

            I'm the Product Manager for DataLink.  Can you help me understand something about this request - what problem are you trying to solve?  If you can describe the use case, we can think about the best way to give you the desired functionality in the product.  I find it usually helps to start with the problem statement, and often we end up with a better solution in the end.

             

            Feel free to e-mail me directly.

             

            Regards,

             

            Jay

              • Re: Datalink 4.1 Beta - Updates method?

                Hi Jay,

                For the good of the vCampus community I will post in here...

                 

                The problem: Excel/Datalink is used "more" than ProcessBook for some clients.  Issue is Excel is not the best tool IMO for real time monitoring, that's where ProcessBook comes in.  Anyway, in the past for Datalink v3 I implemented a timer within Excel to control what Sheet or entire workbooks got refeshed (mainly to refresh datalink functions) on an interval hence my interest when I read Datalink v4.1 beta has this built in.  What I did notice though is the refreshing of data on an interval is either on or off for workbook and I cannot see a why of only specifying worksheets to recalculate (not a big issue).

                 

                So if we adopted the Datalink Updates method rather than our own timer then when certain Excel workbooks are opened we need to ensure the Updates are enabled - if not then call a method to enable Updates for the workbook. If you build some nice worksheets for analysis with trends and see it updating every 5 seconds or so it actually works very well (providing recalculation of cells is quick!).

                 

                What would be really nice (although probably a right pain to implement) is to enable updates for each PI Datalink function inserted into a cell as an extra parameter.  So "=PICurrVal("sinusoid", 1,"pi-slw")" becomes "=PICurrVal("sinusoid", 1,"pi-slw", 1)" with the last parameter enabling updating of the value according to the overall Updates interval.  This would, I assume, only apply to functions using current time *.

                 

                Cheers,

                Rhys.

                  • Re: Datalink 4.1 Beta - Updates method?
                    jlakumb

                    Rhys,

                     

                    Glad to hear you found the new auto-update feature in DL 4.1 so useful.

                     

                    The thing is, we did consider the granularity of auto-update, i.e. at workbook, worksheet, or function level.  The current implemention supports workbook level auto-update.  It turns out that enabling this at the function level (as you describe) would break the forward compatibility of DL spreadsheets.  That is, a DL 3.x user who opens a spreadsheet modified in DL 4.x would potentially receive errors if the function signature changes.  I know we do not claim to be forward compatible (only backward compatible), but we know customers sometimes run multiple versions of DL so this is important to maintain...

                     

                    That said, there may be a middle ground here that could satisfy your needs.  Perhaps we can add an option to update the current sheet only (or a user-specified sheet)?  Then one could create a spreadsheet which only has DL functions that they want to auto-update on Sheet1, for example, and hide the non-updating functions and business logic on Sheet2 or higher.  This feature may be easier to implement since it is the same as Shift+F9 in Excel.  Also, it would support the use case of large workbooks with one sheet/tab for each month, but you only want to auto-update the sheet for the current month.

                     

                    My question to you and rest of the vCampus community is whether auto-updating the current sheet would provide a reasonable solution?  Thanks in advance for everyone's input.  By the way, DL 4.1 is going into release candidate so any immediate feedback you folks can provide would be helpful.

                     

                    Regards,

                     

                    Jay

                      • Re: Datalink 4.1 Beta - Updates method?

                        Jay,

                         

                        For me, being able to specify a worksheet(s) to be recalculated would be great and valuable.  What would be even better is to programatically toggle the updates and the worksheets. 

                         

                        How I look at this from my immediate development cravings would be to enable a worksheet to receive updates, hook into the Worksheet_Calculation event and be able to target specific cells, containing datalink functions, in other worksheets to be updated within the same interval - this is for a very specific need of mine but still you get the general idea.

                         

                        It brings a bit more a feeling of real-time to your worksheets rather than sitting there hitting F9 over and over (believe me I have seen some users doing this in Excel!).

                         

                        Cheers,

                         

                        Rhys.