AFCase.PublishValue Method (AFAttribute, AFValue)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Write the specified value of the AFAttribute directly to the data reference source
using the specified AFValue object.
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void PublishValue( AFAttribute attribute, AFValue newValue )
Public Sub PublishValue ( attribute As AFAttribute, newValue As AFValue ) Dim instance As AFCase Dim attribute As AFAttribute Dim newValue As AFValue instance.PublishValue(attribute, newValue)
public: void PublishValue( AFAttribute^ attribute, AFValue^ newValue )
member PublishValue : attribute : AFAttribute * newValue : AFValue -> unit
Parameters
- attribute
- Type: OSIsoft.AF.AssetAFAttribute
The attribute to publish in the case. The value will be written to the attribute's data reference using the context of this case. - newValue
- Type: OSIsoft.AF.AssetAFValue
The new AFValue for the attribute.
Exceptions
| Exception | Condition |
|---|---|
| InvalidCastException | Thrown when the conversion from the specified UOM or to the configured Type cannot be performed. |
Remarks
Calling this method allows the caller to write directly to the data reference source with the context
of this case without having the value created in the output result set.
| You must have Execute security rights to publish a case value. |