AFDataReference.ReplacePIServerEventFrames Method (PISystem, String, String, Object, Object, EventHandler(AFProgressEventArgs))
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Replaces the PI Data Archive server with another server on the PI Point and PI Point Array data references found
within the attributes and attribute templates and its children of event frames of a PI System.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static int ReplacePIServerEventFrames( PISystem system, string oldServerName, string newServerName, Object startTime, Object endTime, EventHandler<AFProgressEventArgs> eventHandler )
Public Shared Function ReplacePIServerEventFrames ( system As PISystem, oldServerName As String, newServerName As String, startTime As Object, endTime As Object, eventHandler As EventHandler(Of AFProgressEventArgs) ) As Integer Dim system As PISystem Dim oldServerName As String Dim newServerName As String Dim startTime As Object Dim endTime As Object Dim eventHandler As EventHandler(Of AFProgressEventArgs) Dim returnValue As Integer returnValue = AFDataReference.ReplacePIServerEventFrames(system, oldServerName, newServerName, startTime, endTime, eventHandler)
public: static int ReplacePIServerEventFrames( PISystem^ system, String^ oldServerName, String^ newServerName, Object^ startTime, Object^ endTime, EventHandler<AFProgressEventArgs^>^ eventHandler )
static member ReplacePIServerEventFrames : system : PISystem * oldServerName : string * newServerName : string * startTime : Object * endTime : Object * eventHandler : EventHandler<AFProgressEventArgs> -> int
Parameters
- system
- Type: OSIsoft.AFPISystem
The PI System containing the attributes. - oldServerName
- Type: SystemString
The PI Data Archive server name that needs to be changed. - newServerName
- Type: SystemString
The PI Data Archive server name to change to. - startTime
- Type: SystemObject
The start time for the time range of event frames. - endTime
- Type: SystemObject
The end time for the time range of event frames. - eventHandler
- Type: SystemEventHandlerAFProgressEventArgs
Delegate used to receive progress indication on operations.
Return Value
Type: Int32Returns the number of data reference configurations that were modified.