AFEnumerationSet.GetBySystemStateCode Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFEnumerationValue GetBySystemStateCode( AFSystemStateCode stateCode )
Public Shared Function GetBySystemStateCode ( stateCode As AFSystemStateCode ) As AFEnumerationValue Dim stateCode As AFSystemStateCode Dim returnValue As AFEnumerationValue returnValue = AFEnumerationSet.GetBySystemStateCode(stateCode)
public: static AFEnumerationValue^ GetBySystemStateCode( AFSystemStateCode stateCode )
static member GetBySystemStateCode : stateCode : AFSystemStateCode -> AFEnumerationValue
Parameters
- stateCode
- Type: OSIsoft.AF.AssetAFSystemStateCode
The AFSystemStateCode that corresponds to the desired AFEnumerationValue from the SystemStateSet collection.
Return Value
Type: AFEnumerationValueReturns the AFEnumerationValue that corresponds to the specified stateCode parameter.
Remarks
This method is similar to the collection's GetByValue(Int32)) method except
the object is retrieved by AFSystemStateCode from the SystemStateSet
collection.