AFAttributeTrait.HealthStatus Property
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
The AFAttributeTrait that defines the Health Status attribute trait.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static AFAttributeTrait HealthStatus { get; }
Public Shared ReadOnly Property HealthStatus As AFAttributeTrait Get Dim value As AFAttributeTrait value = AFAttributeTrait.HealthStatus
public: static property AFAttributeTrait^ HealthStatus { AFAttributeTrait^ get (); }
static member HealthStatus : AFAttributeTrait with get
Property Value
Type: AFAttributeTraitReturns the AFAttributeTrait that defines the Health Status attribute trait.
Remarks
The value of the health status must be an enumeration value from the system-defined Health Status enumeration set.
When using the FindAttributeTrait(String) method to find this trait, you can use the name 'HealthScore'. This trait has the following behaviors:
- IsAllowedOnRootAttribute
- RequireEnumerationValue
- Required EnumerationSet is 'HealthStatus'
| If the 'Health Status'AFEnumerationSet does not exist, then it will be automatically created for the database when the GetRequiredEnumerationSet(AFDatabase) method is called for this trait. The AFHealthStatus enumeration can be used to look up values in the 'Health Status' enumeration set by value (e.g. 'set.GetByValue((int)AFHealthStatus.InMaintenance);'). |