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

AF SDK Reference

PIPoint.ReplaceValues Method (AFTimeRange, IList(AFValue), AFBufferOption)

PIPoint.ReplaceValues Method (AFTimeRange, IList(AFValue), AFBufferOption)

  • Last UpdatedNov 18, 2025
  • 3 minute read
PIPoint.ReplaceValues Method (AFTimeRange, IList(AFValue), AFBufferOption)
This method removes existing data within the specified AFTimeRange and inserts the specified values.

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

Syntax

public AFErrors<AFValue> ReplaceValues(
	AFTimeRange timeRange,
	IList<AFValue> values,
	AFBufferOption bufferOption
)
Public Function ReplaceValues ( 
	timeRange As AFTimeRange,
	values As IList(Of AFValue),
	bufferOption As AFBufferOption
) As AFErrors(Of AFValue)

Dim instance As PIPoint
Dim timeRange As AFTimeRange
Dim values As IList(Of AFValue)
Dim bufferOption As AFBufferOption
Dim returnValue As AFErrors(Of AFValue)

returnValue = instance.ReplaceValues(timeRange, 
	values, bufferOption)
public:
AFErrors<AFValue^>^ ReplaceValues(
	AFTimeRange timeRange, 
	IList<AFValue^>^ values, 
	AFBufferOption bufferOption
)
member ReplaceValues : 
        timeRange : AFTimeRange * 
        values : IList<AFValue> * 
        bufferOption : AFBufferOption -> AFErrors<AFValue> 

Parameters

timeRange
Type: OSIsoft.AF.TimeAFTimeRange
The bounding time range for replacement of the existing values.
values
Type: System.Collections.GenericIListAFValue
The list of replacement values with an associated PIPoint for each value. If an empty list then existing data within the specified AFTimeRange will be deleted. The time stamp of AFValue in values must be within the specified AFTimeRange.
bufferOption
Type: OSIsoft.AF.DataAFBufferOption
An enumeration value that specifies buffering option.

Return Value

Type: AFErrorsAFValue
If there are no errors, then is returned. Otherwise an AFErrorsTKey instance containing error information is returned.

Remarks

This method requires PI Data Archive 2016 or later that supports DeleteRange feature. This is indicated by Supports(PIServerFeature) check returning for the case of DeleteRange.

For successful data write through Buffer, this method requires that PI Buffer Subsystem (PIBufSS) needs to be correctly pre-configured with Buffering Manager. Currently, buffering data through PIBufSS has a limitation where error feedback from PI Data Archive cannot be returned to the caller.

Data write through Buffer will be fanned to Collective members.

Important note Important
Exception reporting is not handled automatically by the AF SDK. Historically, exception reporting has been handled by the application writing data (i.e. Uniint-based interfaces).

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, 2.9.5, 2.9, 2.8.5, 2.8

See Also

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