Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFEventFrame.DeleteEventFrames Method

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFEventFrame.DeleteEventFrames Method
Delete the objects with the specified unique identifiers.

Namespace:  OSIsoft.AF.EventFrame
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static void DeleteEventFrames(
	PISystem system,
	IList<Guid> ids
)
Public Shared Sub DeleteEventFrames ( 
	system As PISystem,
	ids As IList(Of Guid)
)

Dim system As PISystem
Dim ids As IList(Of Guid)

AFEventFrame.DeleteEventFrames(system, ids)
public:
static void DeleteEventFrames(
	PISystem^ system, 
	IList<Guid>^ ids
)
static member DeleteEventFrames : 
        system : PISystem * 
        ids : IList<Guid> -> unit 

Parameters

system
Type: OSIsoft.AFPISystem
The PISystem containing the objects to be deleted.
ids
Type: System.Collections.GenericIListGuid
A list of the unique identifiers of the objects to be checked out.

Remarks

This method will delete the objects in the specified list of ids with out requiring a checkout of the object. If the object is already checked out by another user the specified object will still be deleted.

This method will delete all references, including sandbox, to any object specified in the list of ids where the user has Delete permission on the object.

Examples

// This example demonstrates how to use efficiently delete event frames using
//  AFEventFrameSearch and the DeleteEventFrames method.

// Get the Database
PISystems myPISystems = new PISystems();
PISystem myPISystem = myPISystems.DefaultPISystem;
AFDatabase myDB = myPISystem.Databases.DefaultDatabase;

// Search for the event frames to be deleted.
using (var search = new AFEventFrameSearch(myDB, "FindEventFrames", @"Template:'MyTemplate'"))
{
    search.CacheTimeout = TimeSpan.FromMinutes(10);

    // Get a list of IDs of event frames to be deleted in pages of 100.
    foreach (IList<Guid> pageOfIds in search.FindObjectIds().ChunkedBy(100))
    {
        AFEventFrame.DeleteEventFrames(myPISystem, pageOfIds);
    }
}
' This example demonstrates how to use efficiently delete event frames using
'  AFEventFrameSearch And the DeleteEventFrames method.

' Get the Database
Dim myPISystems As PISystems = New PISystems()
Dim myPISystem As PISystem = myPISystems.DefaultPISystem
Dim myDB As AFDatabase = myPISystem.Databases.DefaultDatabase
Using search As New AFEventFrameSearch(myDB, "FindEventFrames", "Template:'MyTemplate'")
    search.CacheTimeout = TimeSpan.FromMinutes(10)
    For Each pageOfIds As IList(Of Guid) In search.FindObjectIds().ChunkedBy(100)
        AFEventFrame.DeleteEventFrames(myPISystem, pageOfIds)
    Next
End Using

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10

See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in