AFAttributeTemplate.Trait Property
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This property specifies the attribute trait for the attributes created from this template.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFAttributeTrait Trait { get; set; }
Public Property Trait As AFAttributeTrait Get Set Dim instance As AFAttributeTemplate Dim value As AFAttributeTrait value = instance.Trait instance.Trait = value
public: virtual property AFAttributeTrait^ Trait { AFAttributeTrait^ get () sealed; void set (AFAttributeTrait^ value) sealed; }
abstract Trait : AFAttributeTrait with get, set override Trait : AFAttributeTrait with get, set
Property Value
Type: AFAttributeTraitSpecifies the AFAttributeTrait for the attributes created from this template. Returns when a trait is not defined.
Implements
IAFAttributeTrait
Remarks
When an AFAttributeTrait is defined on an attribute, it defines a well-known behavior and relationship to other attributes. The trait can also be used when referencing an attribute by path instead of needing to know the name of the attribute. For example, the path "|Pressure|[@Trait=LoLo]" would reference attribute with the LimitLoLo trait under the "Pressure" attribute.
| The attribute's Type and DefaultUOM will be set based on the trait's defined rules. The attribute's value will be set to a default value for the trait. |