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

Inheritance Hierarchy
OSIsoft.AFAFObject
OSIsoft.AF.AssetAFBaseElement
OSIsoft.AF.AssetAFElement
OSIsoft.AF.EventFrameAFEventFrame
OSIsoft.AF.NotificationAFNotification
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[SerializableAttribute] public abstract class AFBaseElement : AFObject, IComparable<AFBaseElement>
<SerializableAttribute> Public MustInherit Class AFBaseElement Inherits AFObject Implements IComparable(Of AFBaseElement) Dim instance As AFBaseElement
[SerializableAttribute] public ref class AFBaseElement abstract : public AFObject, IComparable<AFBaseElement^>
[<AbstractClassAttribute>] [<SerializableAttribute>] type AFBaseElement = class inherit AFObject interface IComparable<AFBaseElement> end
The AFBaseElement type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| Attributes |
This is a collection of attributes that are owned by this element.
| |
| Categories |
This is a user-defined collection of categories for the object that can be used for
querying and/or reporting purposes.
| |
| CategoriesString |
This read-only property returns the list of categories in a string separated by semicolons.
| |
| Database |
This read-only property returns the AFDatabase where this object is defined.
| |
| DefaultAttribute |
The default AFAttribute for the AFBaseElement.
| |
| DefaultInputPort |
The default input AFPort for the AFBaseElement.
| |
| DefaultOutputPort |
The default output AFPort for the AFBaseElement.
| |
| DefaultUndirectedPort |
The default undirected AFPort for the AFBaseElement.
| |
| Description |
Read/write property that provides a more detailed description of the object.
| |
| ExtendedProperties |
A dictionary of extended properties that can be used to store application specific information.
| |
| ID |
Read-only property that provides a unique identifier for the object to be used for
quick access that is not dependent upon the index.
(Inherited from AFObject.) | |
| Identity |
This read-only property contains identity of the object.
(Inherited from AFObject.) | |
| IsAnnotated |
This property indicates whether this element has any annotations.
| |
| IsDeleted |
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.) | |
| Name |
Read/write property that identifies the name of the object.
| |
| PISystem |
This read-only property allows access to the PISystem associated with this
object.
(Inherited from AFObject.) | |
| Ports |
This is a collection of AFPort objects representing the possible connection ports
for this element.
Ports are used in a AFModel to define an AFConnection
between AFBaseElement object.
| |
| Template |
The AFElementTemplate that was used to define this object.
| |
| Type |
This read-only property specifies the base type of the element.
| |
| UniqueID |
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.) |
Methods
| Name | Description | |
|---|---|---|
| CompareTo(Object) |
Compares this instance with a specified Object.
(Inherited from AFObject.) | |
| CompareTo(AFObject) |
Compares this instance with a specified AFObject.
(Inherited from AFObject.) | |
| CreateElementTemplate |
Create an AFElementTemplate based upon the element.
| |
| Equals(Object) |
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.) | |
| Equals(AFObject) |
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.) | |
| GetAnnotations |
Retrieves a collection of existing AFAnnotation objects belonging to this
AFBaseElement.
| |
| GetAttributeByTrait |
Retrieves the child AFAttribute with the specified AFAttributeTrait.
| |
| GetAttributesByTrait |
Retrieves a list of child AFAttribute objects identified by the specified list of attribute traits.
| |
| GetHashCode |
Gets the hash code for this instance of the object which is suitable for use in hashing
algorithms and data structures like a hash table.
(Inherited from AFObject.) | |
| GetPath |
Returns the full path to the object, using just the names.
(Inherited from AFObject.) | |
| GetPath(AFObject) |
Returns the path to the object relative from another object.
(Inherited from AFObject.) | |
| GetPath(AFEncodeType, AFObject) |
Returns the path to the object relative from another object,
using the name and/or id as specified
by encodeType.
(Inherited from AFObject.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IsTypeOf |
Checks if the current AFBaseElement is derived from the
specified AFElementTemplate.
| |
| Persist |
This method returns the persistence string for the object.
(Inherited from AFObject.) | |
| ToString |
Returns a String that represents the current object.
(Inherited from AFObject.) |
Remarks
An element can be created from a template, or, without a template. When based on a template, the element will derive its initial definition of Categories, Attributes, and Ports from the template. Later modifications to the template will be propagated to all elements created from it. If the template allows it, or, if the element was not created from a template, the element's ports and attributes can be augmented with additional members. When based on a template, the template also defines the DefaultAttribute, DefaultInputPort, DefaultOutputPort, and DefaultUndirectedPort properties.
The following object types are also element: AFElement, AFTransfer, and AFModel. These objects are created with a template which specifies the type of element to create in the AFElementTemplate.InstanceType.