What are you using a zero duration event frame for? We have had many debates internally on this. Conceptually an "event" that has no duration is difficult for me to understand - it's more like an alarm. I always ask myself whether we need something different than event frames.........
AF Product Manager
1 of 1 people found this helpful
Move the search start back 1-second, and the search end forward 1-second. You may get back a few more event frames than you wanted, but you can add your own filter on the returned collection once its within your grasp.
Rick, thanks for that idea. Of course, it can be that simple....
Stephen, Well, an event can have a zero duration, and you could perfectly use that for lots of stuff, including alarms. E.g. pushing a button: the downpress functionally has a zero duration. Even if you look at the PI data of a switch, you can see a PI point going to closed at time X, and going to open at time Y, having 2 PI Point Events. But still the time the button was pressed is time X.
Not really an issue found yet, but i noticed this implied assumption in the note. So i started wondering if by concept, zero-duration EventFrames are in the set of scenarios for EF. If it's not really supported, we should stay clear of that.
It seems like I was able to find a zero duration Event Frame with the AFSearchMode of "Inclusive". After creating an Event Frame that referenced "myElement" with a start and end time of "25-Feb-2015 12:31:00", I was able to find it using the following method:
myElement.GetEventFrames(AFSearchMode.Inclusive, "25-Feb-2015 12:31:00", "25-Feb-2015 12:31:00", "*", null, null, AFSortField.Name, AFSortOrder.Ascending, 0, 10)
However, any other search mode apart from "Inclusive" does not work.