Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFAttribute.Trait Property

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFAttribute.Trait Property
This property specifies the attribute trait for this attribute.

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 AFAttribute
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: AFAttributeTrait
Specifies the AFAttributeTrait for this attribute.

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.

If this attribute was created from an AFAttributeTemplate, then the value of this property is defined by the template and cannot be changed. In this case, changing the AFAttributeTemplate.Trait property also changes the value of this property. If the attribute was NOT created from a template, then this property can be modified.

Caution note Caution
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.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8

See Also

In This Topic
TitleResults for “How to create a CRG?”Also Available in