AFDataReference.Repair Method (AFDatabase, EventHandler(AFProgressEventArgs))
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Executes the repair function on the PI Point or PI Point Array data references found
within the attributes and its children of a database. When PI point ids or point names
in the ConfigString no longer match those on the PI Data Archive, a repair fixes the mismatch.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static int Repair( AFDatabase database, EventHandler<AFProgressEventArgs> eventHandler )
Public Shared Function Repair ( database As AFDatabase, eventHandler As EventHandler(Of AFProgressEventArgs) ) As Integer Dim database As AFDatabase Dim eventHandler As EventHandler(Of AFProgressEventArgs) Dim returnValue As Integer returnValue = AFDataReference.Repair(database, eventHandler)
public: static int Repair( AFDatabase^ database, EventHandler<AFProgressEventArgs^>^ eventHandler )
static member Repair : database : AFDatabase * eventHandler : EventHandler<AFProgressEventArgs> -> int
Parameters
- database
- Type: OSIsoft.AFAFDatabase
The database containing the attributes. - eventHandler
- Type: SystemEventHandlerAFProgressEventArgs
Delegate used to receive progress indication on operations.
Return Value
Type: Int32Returns the number of data reference configurations that were modified.