AFValue.CreateSystemStateValue Method (AFSystemStateCode, AFTime)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
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: AFValueAn 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 .