1 of 1 people found this helpful
AF SDK calls are synchronous, provided that you are not making multi-threaded/parallel calls. This means that the application will wait until UpdateValues to finish before moving on to the next statement. With that said, there are several other factors in play before you will be able to see the change reflected in PI SMT.
- PI Buffer Subsystem: depending on how many events you are removing at a time, PI buffer subsystem might queue up events to be removed. In that case, your UpdateValues operation will complete but events are still in the buffer queue.
- If you don't have buffering on, events will queue up in the event queue before getting committed into the archive.
Can you also let me know your use case? Why would you like to delete all events for a tag before the next one? Perhaps we can suggest an alternative workaround.
One solution (to ensure that all events are deleted) would be to query for the last AF value in the time range repeatedly until it cannot be retrieved anymore.
FYI: I have moved this discussion to PI Developers Club > PI .NET Framework for continued discussion.