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

AF SDK Reference

AFAttributeTemplate.Trait Property

  • Last UpdatedNov 18, 2025
  • 2 minute read
AFAttributeTemplate.Trait Property
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: AFAttributeTrait
Specifies 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.

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