AFAttributeTrait Class
- Last UpdatedNov 18, 2025
- 9 minute read
- PI System
- AF SDK 2024 R2
- Developer

Inheritance Hierarchy
OSIsoft.AF.AssetAFAttributeTrait
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public class AFAttributeTrait
Public Class AFAttributeTrait Dim instance As AFAttributeTrait
public ref class AFAttributeTrait
type AFAttributeTrait = class end
The AFAttributeTrait type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| Abbreviation |
The abbreviation of the AFAttributeTrait.
| |
| AllAnalyses |
The list of all analysis attribute traits.
| |
| AllHealth |
The list of all health attribute traits.
| |
| AllLimits |
The list of all limit attribute traits.
| |
| AllLocations |
The list of all location attribute traits.
| |
| AllOther |
The list of all other attribute traits.
| |
| AllowChildAttributes |
Indicates if the AFAttribute with this trait defined is allowed to have child attributes.
| |
| AllowDisplayDigits |
Indicates if the AFAttribute with this trait defined is allowed to define a value for DisplayDigits.
| |
| AllowDuplicates |
Indicates if the parent AFAttribute is allowed to have duplicates of this trait defined.
| |
| AllTraits |
The list of all attribute traits.
| |
| AnalysisStartTriggerExpression |
The AFAttributeTrait that defines the StartTriggerExpression analysis attribute trait.
| |
| AnalysisStartTriggerName |
The AFAttributeTrait that defines the StartTriggerName analysis attribute trait.
| |
| Forecast |
The AFAttributeTrait that defines the Forecast attribute trait.
| |
| HealthScore |
The AFAttributeTrait that defines the Health Score attribute trait.
| |
| HealthStatus |
The AFAttributeTrait that defines the Health Status attribute trait.
| |
| IsAllowedOnRootAttribute |
Indicates if the trait is allowed on a root AFAttribute.
| |
| IsTypeInherited | ||
| IsUOMInherited |
Indicates if the DefaultUOM is inherited from the parent AFAttribute.
| |
| LimitHi |
The AFAttributeTrait that defines the Hi limit attribute trait.
| |
| LimitHiHi |
The AFAttributeTrait that defines the HiHi limit attribute trait.
| |
| LimitLo |
The AFAttributeTrait that defines the Lo limit attribute trait.
| |
| LimitLoLo |
The AFAttributeTrait that defines the LoLo limit attribute trait.
| |
| LimitMaximum |
The AFAttributeTrait that defines the Maximum limit attribute trait.
| |
| LimitMinimum |
The AFAttributeTrait that defines the Minimum limit attribute trait.
| |
| LimitTarget |
The AFAttributeTrait that defines the Target limit attribute trait.
| |
| LocationAltitude |
The AFAttributeTrait that defines the Altitude location attribute trait.
| |
| LocationLatitude |
The AFAttributeTrait that defines the Latitude location attribute trait.
| |
| LocationLongitude |
The AFAttributeTrait that defines the Longitude location attribute trait.
| |
| Name |
The name of the AFAttributeTrait.
| |
| Reason |
The AFAttributeTrait that defines the Reason attribute trait.
| |
| RequireEnumerationValue |
Indicates if the AFAttribute with this trait defined must have a Type
that is an AFEnumerationValue.
| |
| RequireNumeric |
Indicates if the AFAttribute with this trait defined must have a Type that is numeric.
| |
| RequireString |
Methods
| Name | Description | |
|---|---|---|
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| FindAttributeTrait |
Finds the AFAttributeTrait from the specified name.
| |
| GetDefaultUOM |
Gets the default UOM that is specified for the AFAttribute.
| |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetRequiredEnumerationSet |
Gets the required AFEnumerationSet that is specified for the AFAttribute.
| |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ToString |
Returns a String that represents the current object.
(Overrides ObjectToString.) | |
| ValidateTrait |
Helper function to validate if an AFAttributeTrait is valid
for an attribute.
|
Remarks
An AFAttributeTrait can be assigned to an AFAttributeTemplate or AFAttribute to define a trait with a well-known relationship to other attributes. The following methods can be used for accessing an attribute template or attribute by trait:
- GetAttributeTemplateByTrait(AFAttributeTrait)
- GetAttributeTemplatesByTrait(ICollectionAFAttributeTrait)
- GetAttributeByTrait(AFAttributeTrait)
- GetAttributesByTrait(ICollectionAFAttributeTrait)
A trait can be found by name or abbreviation using the FindAttributeTrait(String) method. Traits may also have well-known behaviors. For example, limit traits will have the same Type (see IsTypeInherited) and DefaultUOM (see IsUOMInherited) as the parent AFAttribute.
Traits are divided in to the following categories:
- Analysis
- Health
- Limit
- Location
- Other
The Analysis traits allow the attributes that define special information about an AFAnalysis to be indicated. For example, the AnalysisStartTriggerName and AnalysisStartTriggerExpression specify which attributes contain the start trigger name and expression for the analysis. You can use the AllAnalyses property to get the list of all the analysis traits. This is a list of the analysis traits:
The Health traits allow the attributes that indicate information about the health of an asset. For example, the HealthStatus will indicate the health status of the associated asset. You can use the AllHealth property to get the list of all the health traits. This is a list of the health traits:
The Limit traits allow the attributes that define the expected range of a process variable or measurement to be defined. Limit traits have a priority with LimitMinimum having the lowest priority and LimitMaximum having the highest priority. If a limit attribute is missing, client applications will need to determine the proper behavior. For example, the absence of LimitHi could fall back to LimitHiHi which falls back to LimitMaximum. You can use the AllLimits property to get the list of all the limit traits. This is a list of the limit traits:
The Location traits allow attributes to define information about the location of an asset. This information could then be used to identify the location of the asset on a map. You can use the AllLocations property to get the list of all the location traits. This is a list of the location traits:
The Other traits are the ones that don't fit in another specific category of traits. It contains the Forecast trait which allows a predicted attribute to be placed under the measured attribute. Client applications can then automatically know how to relate these attributes. For example, the attributes could be trended together so show the actual versus the predicted values. Multiple forecast attributes can be defined for a single parent attribute and they are not required to be a future value. It also includes the Reason trait indicating the attribute that contains a reason for the state of the object. You can use the AllOther property to get the list of all the other traits. This is a list of the other traits:
The following chart shows the traits grouped by their category and indicates which behavior rules are defined for each trait.
