AnsweredAssumed Answered

Deleting data from a PI Collective using PI SDK

Question asked by OscarGarciaLino on Aug 18, 2015
Latest reply on Aug 18, 2015 by Dan Fishman

I have an application running on excel which has the option to insert or delete data from the archive servers. Everything works fine but I am having issues when trying to delete the snapshot value for a tag.

In the code, I use IPICollective to connect individually to each collective member and delete the data. The process is as follows:

1.- Connect to one collective member (primary member).

2.- Get the tag name, get period of time to delete data (start and end time)

3.- Delete the data using the following line of code: ptTag.Data.RemoveValues dtmTimestamp, EndTimestamp, drRemoveAll

4.- Disconnects from current collective member.

5.- Connect to next collective member (secondary member) and repeat steps 2 to 4.


The application removes the data but it does not remove the snapshot value, and the following error is displayed: "Failed to remove one or more requested events. [0] Success".

The application runs from a client machine, and buffering is enabled to properly update the data in the collective when choosing the insert values option in the application.


Why Data.RemoveValues does not remove the snapshot value? Is there any other function I could use or how could I make my application to support snapshot values delete?