AFCase.PublishValue Method (AFAttribute, Object, UOM)
- 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
with the specified unit-of-measure at the case's EndTime.
Namespace: OSIsoft.AF.Analysis
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public void PublishValue( AFAttribute attribute, Object newValue, UOM specifiedUOM )
Public Sub PublishValue ( attribute As AFAttribute, newValue As Object, specifiedUOM As UOM ) Dim instance As AFCase Dim attribute As AFAttribute Dim newValue As Object Dim specifiedUOM As UOM instance.PublishValue(attribute, newValue, specifiedUOM)
public: void PublishValue( AFAttribute^ attribute, Object^ newValue, UOM^ specifiedUOM )
member PublishValue : attribute : AFAttribute * newValue : Object * specifiedUOM : UOM -> 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: SystemObject
The new value for the attribute. - specifiedUOM
- Type: OSIsoft.AF.UnitsOfMeasureUOM
The unit of measure of the newValue parameter. If , then the unit of measure may be specified as part of the value in string format (e.g. "100.0 ft"). Otherwise, the unit of measure of the value is assumed to be in terms of the attribute's DefaultUOM property.
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.