2 Replies Latest reply on Nov 27, 2018 7:41 PM by dmoler

    How to Capture Values from Event Frames in bulk?


      I'll be calling capture values programatically using AF SDK on (sometimes) thousands of Event Frames. The only way I found was to iterate in a Event Frame collection calling CaptureValues() individually. Is there a way to capture values in bulk similar to AFEventFrame.DeleteEventFrames?

        • Re: How to Capture Values from Event Frames in bulk?
          Dan Fishman

          Unfortunately, there is no way to to capture in bulk similar to AFEventFrame.DeleteEventFrames.  For large capturing, I have used Parallel.Foreach.  You also probably want to chunk so are not check-in thousands of Event Frames at once. 

          • Re: How to Capture Values from Event Frames in bulk?

            The reason this has not been implemented is that each event frame typically has its own time context (start/end times) and there wouldn't be many opportunities for efficiency gains in this case - in fact, the added overhead of packaging and unpacking needed for bulk calls might make it a bit slower. What AFSDK does support is the ability to capture event frames using an AFDataCache. If the data required by the event frame value capture is in the cache, then no RPC is necessary - this is what Asset Analytics uses to improve event frame value capture performance. If you need to capture data for many event frames targeting a few elements, you could query for ranges of data for the element attributes, put that data in an AFDataCache instance (use the ManualRange mode to add the attributes), then pass in that AFDataCache instance when capturing the event frames.

            1 of 1 people found this helpful