3 Replies Latest reply on Apr 22, 2013 1:26 PM by dhollebeek

    ProcessBook Issue with an Overflow Error


      Hello all,


      I have a random error, occuring sometimes when I rebuild/refresh my display.

      Error Number : 6
      Error Description : Overflow

       Part of my rebuild/refresh code :

      'set the tag name of my object value
      Dim myAFAttribute As String
      ThisDisplay.Value1.SetTagName (myAFAttribute & ";m3/h")
      'Modify the Time range of my object value
      Dim Check As Boolean
      Dim bsStart As String
      Dim bsEnd As String
      Dim CurrentDate As Date
      CurrentDate = now
      bsStart= CStr(DateAdd("h", 6,CurrentDate ))
      bsEnd = CStr(DateAdd("h", 1, bsEnd ))
      Check = ThisDisplay.Value1.SetTimeRange(bsStart, bsEnd )
      'Get the value of my object value
      Dim StrValue As String
      Dim vrDate As Variant
      Dim vrStatut As Variant
      StrValue = ThisDisplay.Value1.GetValue(vrDate, vrStatut)

      I'm doing this for above 20 value objects with diferent timerange.


      I have also trends and XYPlot on this display.


      Am I doing something wrong, or is it an known issue ?




      Thank you for your time.

        • Re: ProcessBook Issue with an Overflow Error

          Hello Guillaume,


          I wasn't able to locate a known issue for ProcessBook with the information you provided.


          Can you narrow down what variable is overflowing / where within your code the exception occurs or is this random too?


          What exactly is "rebuild/refresh" referring too?


          Is my understanding correct that you initialize controls with each "rebuild/refresh"? Why?

            • Re: ProcessBook Issue with an Overflow Error

              Hi Gregor thank you for your quick reply,


              What I named "rebuild/refresh" is indeed initialization of controls. I rebuild controls when the user change the curent context, like change the date or change the AF element.


              I narrow down my issue and it's seems didn't come from the code I quote before.


              I think have identified my issue.


              I'm using a pdi file and a piw file. The piw file has several displays and reference to the pdi file. The pdi file has global variables and global vba codes.


              These variables and vba codes are commun of all displays on the piw. I was using public variables directly from piw to my displays (on piw). And I suppose that my issue of overflow memory come from this use.


              I will modify the access level of my variables from public to private. And I will build get() and set() functions to access to my variables.


              I will let you know if it resolves my issue.

                • Re: ProcessBook Issue with an Overflow Error

                  The event for changing current context is a little flaky.  It fires just BEFORE the context changes.  What we do in our addins is set a global flag when we get a context changed event and then subscribe to Application.OnIdle.  Once that fires, if the global flag is set, we clear it and do the context change processing because at that point it has completed.