PIPoint.UpdateValue Method (AFValue, AFUpdateOption)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This method writes or replaces a value in the PI Data Archive.
Namespace: OSIsoft.AF.PI
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void UpdateValue( AFValue value, AFUpdateOption option )
Public Sub UpdateValue ( value As AFValue, option As AFUpdateOption ) Dim instance As PIPoint Dim value As AFValue Dim option As AFUpdateOption instance.UpdateValue(value, option)
public: void UpdateValue( AFValue^ value, AFUpdateOption option )
member UpdateValue : value : AFValue * option : AFUpdateOption -> unit
Parameters
- value
- Type: OSIsoft.AF.AssetAFValue
The value to be written, replaced, or removed in PI. - option
- Type: OSIsoft.AF.DataAFUpdateOption
An enumeration value that specifies how to treat duplicate values in the archive. It can also be used to specify that an existing value should be removed.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | The value is . |
| PIException | Error returned by the PI Data Archive. |
Remarks
If not specified in AFSDK.config, the AFBufferOption is defaulted to BufferIfPossible. The default buffering option for the current AF SDK client instance can be modified via the static property AFData.BufferOption.
| 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). |