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

AF SDK Reference

AFValue.Create Method (AFAttribute, Single, AFTime, UOM, AFValueStatus, Object)

AFValue.Create Method (AFAttribute, Single, AFTime, UOM, AFValueStatus, Object)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFValue.Create Method (AFAttribute, Single, AFTime, UOM, AFValueStatus, Object)
This method will create an AFValue object of Single type that is associated with an AFAttribute.

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

Syntax

public static AFValue Create(
	AFAttribute attribute,
	float value,
	AFTime timestamp,
	UOM uom = null,
	AFValueStatus status = AFValueStatus.Good,
	Object additionalInfo = null
)
Public Shared Function Create ( 
	attribute As AFAttribute,
	value As Single,
	timestamp As AFTime,
	Optional uom As UOM = Nothing,
	Optional status As AFValueStatus = AFValueStatus.Good,
	Optional additionalInfo As Object = Nothing
) As AFValue

Dim attribute As AFAttribute
Dim value As Single
Dim timestamp As AFTime
Dim uom As UOM
Dim status As AFValueStatus
Dim additionalInfo As Object
Dim returnValue As AFValue

returnValue = AFValue.Create(attribute, 
	value, timestamp, uom, status, additionalInfo)
public:
static AFValue^ Create(
	AFAttribute^ attribute, 
	float value, 
	AFTime timestamp, 
	UOM^ uom = nullptr, 
	AFValueStatus status = AFValueStatus::Good, 
	Object^ additionalInfo = nullptr
)
static member Create : 
        attribute : AFAttribute * 
        value : float32 * 
        timestamp : AFTime * 
        ?uom : UOM * 
        ?status : AFValueStatus * 
        ?additionalInfo : Object 
(* Defaults:
        let _uom = defaultArg uom null
        let _status = defaultArg status AFValueStatus.Good
        let _additionalInfo = defaultArg additionalInfo null
*)
-> AFValue 

Parameters

attribute
Type: OSIsoft.AF.AssetAFAttribute
The AFAttribute to be associated with the value.
value
Type: SystemSingle
The new value to be assigned to the Value property.
timestamp
Type: OSIsoft.AF.TimeAFTime
The timestamp associated with the value.
uom (Optional)
Type: OSIsoft.AF.UnitsOfMeasureUOM
The UOM of the specified value.
status (Optional)
Type: OSIsoft.AF.AssetAFValueStatus
The status which indicates whether the new value is a good or bad status, substituted, questionable, or annotated.
additionalInfo (Optional)
Type: SystemObject
The additionalInfo associated with the value, such as AFAnnotation or AFAnnotations object.

Return Value

Type: AFValue
An instance of AFValue.

Remarks

This method is useful for creating an AFValue of primitive type that avoids boxing/unboxing through Object, when writing or reading data to or from a data server.

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
Related Links
TitleResults for “How to create a CRG?”Also Available in