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

AF SDK Reference

AFValue.CreateSystemStateValue Method (AFSystemStateCode, AFTime)

AFValue.CreateSystemStateValue Method (AFSystemStateCode, AFTime)

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFValue.CreateSystemStateValue Method (AFSystemStateCode, AFTime)
This method will create an AFValue object with a system AFEnumerationValue as its value with a Bad status that is not associated with an AFAttribute.

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

Syntax

public static AFValue CreateSystemStateValue(
	AFSystemStateCode stateCode,
	AFTime timestamp
)
Public Shared Function CreateSystemStateValue ( 
	stateCode As AFSystemStateCode,
	timestamp As AFTime
) As AFValue

Dim stateCode As AFSystemStateCode
Dim timestamp As AFTime
Dim returnValue As AFValue

returnValue = AFValue.CreateSystemStateValue(stateCode, 
	timestamp)
public:
static AFValue^ CreateSystemStateValue(
	AFSystemStateCode stateCode, 
	AFTime timestamp
)
static member CreateSystemStateValue : 
        stateCode : AFSystemStateCode * 
        timestamp : AFTime -> AFValue 

Parameters

stateCode
Type: OSIsoft.AF.AssetAFSystemStateCode
The AFSystemStateCode associated with the desired system AFEnumerationValue to be assigned to the Value property.
timestamp
Type: OSIsoft.AF.TimeAFTime
The timestamp associated with the new value.

Return Value

Type: AFValue
An instance of AFValue representing a system state value.

Remarks

The new value will have its Value property set to the system AFEnumerationValue associated with the specified stateCode. The Status will be set to Bad and the UOM property will be set to .

Version Information

AFSDK


See Also

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