1 Reply Latest reply on Jul 6, 2017 11:26 AM by Rick Davin

    FindEventFramesByAttribute missing events


      Anyone having issues using the FindEventFramesByAttribute and it's missing events for AF SDK 2.8 + ?

      We seem to have any issue with missing events.. it doesn't pull them all and the missing events are random.

      Using no attribute query and also using no elementtemplatename in the search will pull all events.. then afterwards you can apply a Linq query.. but find this sad that we can't take full advantage of this find event frame feature and specify exactly the events I need.

      Using many versions of the SDK.. 2.8.0, 2.8.6, 2.9.0... and need to support all these version.. so can't just start using the latest and greatest.

      Previous version of the SDK did not have this issue it seems.


      Just wondering if anyone else has this issue.. or could it be that I'm not doing the correct calls.


        • Re: FindEventFramesByAttribute missing events
          Rick Davin

          Hi Arsene,


          Since you reference PI AF SDK methods, your post has been moved to the PI Developers Club space.


          I have not heard of such a problem.  We need to see your code to be able to provide a quality answer to you. 


          Which overload of FindEventFramesByAttribute are you using?


          Are the event frames to be returned all closed (i.e. have an EndTime before AFTime.MaxValue), and have you explicitly or implicitly issued CaptureValues on them?


          Both of the FindEventFramesByAttribute overloads are paged calls.  However, the paging is left up to you, which is another way of saying only 1 page is sent with method.  If you want subsequent pages, you need to place the calls in a loop where you keep adjusting startIndex within each iteration.  This means your code has 2 loops: one for the paged calls, and one per each event frame item in a page.


          With 2.8 or later, you don't have to have the latest or greatest to use AFEventFrameSearch, where paging is performed transparently for you.  In this case, you code has 1 loop to go over each event frame item.  The minimum requirement is AF 2.8.


          Lastly, read the Important notices in the Help for either of the FindEventFramesByAttribute methods:



          Important note Important
          This will only search event frames that have been checked into the server. If the attribute's IsConfigurationItem property is true, then only the attribute values that have been checked into the server will be searched. If the attribute's values have been captured for the event frame (the AreValuesCaptured property is true), then only the attribute values that have been captured and checked into the server will be searched.


          Important note Important
          The value of any attributes used in the query with a configured DataReference will be evaluated on the client. This means that additional results could be removed from those returned from the server and therefore return less than the specified maxCount.


          Important note Important
          Consider using the new AFEventFrameSearch class for finding event frames instead of using this method.


          If we see your code, we can provide a better answer to you.