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

AF SDK Reference

AFBaseElement Class

  • Last UpdatedNov 18, 2025
  • 7 minute read
AFBaseElement Class
The AFBaseElement is a logical grouping of attributes associated with an element, model, transfer, or similar objects.

Inheritance Hierarchy

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

  NameDescription
Public property
Attributes
This is a collection of attributes that are owned by this element.
Public property
Categories
This is a user-defined collection of categories for the object that can be used for querying and/or reporting purposes.
Public property
CategoriesString
This read-only property returns the list of categories in a string separated by semicolons.
Public property
Database
This read-only property returns the AFDatabase where this object is defined.
Public property
DefaultAttribute
The default AFAttribute for the AFBaseElement.
Public property
DefaultInputPort
The default input AFPort for the AFBaseElement.
Public property
DefaultOutputPort
The default output AFPort for the AFBaseElement.
Public property
DefaultUndirectedPort
The default undirected AFPort for the AFBaseElement.
Public property
Description
Read/write property that provides a more detailed description of the object.
Public property
ExtendedProperties
A dictionary of extended properties that can be used to store application specific information.
Public property
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.)
Public property
Identity
This read-only property contains identity of the object.
(Inherited from AFObject.)
Public property
IsAnnotated
This property indicates whether this element has any annotations.
Public property
IsDeleted
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.)
Public property
Name
Read/write property that identifies the name of the object.
Public property
PISystem
This read-only property allows access to the PISystem associated with this object.
(Inherited from AFObject.)
Public property
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.
Public property
Template
The AFElementTemplate that was used to define this object.
Public property
Type
This read-only property specifies the base type of the element.
Public property
UniqueID
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.)

Methods

  NameDescription
Public method
CompareTo(Object)
Compares this instance with a specified Object.
(Inherited from AFObject.)
Public method
CompareTo(AFObject)
Compares this instance with a specified AFObject.
(Inherited from AFObject.)
Public method
CreateElementTemplate
Create an AFElementTemplate based upon the element.
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.)
Public method
Equals(AFObject)
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.)
Public method
GetAnnotations
Retrieves a collection of existing AFAnnotation objects belonging to this AFBaseElement.
Public method
GetAttributeByTrait
Retrieves the child AFAttribute with the specified AFAttributeTrait.
Public method
GetAttributesByTrait
Retrieves a list of child AFAttribute objects identified by the specified list of attribute traits.
Public method
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.)
Public method
GetPath
Returns the full path to the object, using just the names.
(Inherited from AFObject.)
Public method
GetPath(AFObject)
Returns the path to the object relative from another object.
(Inherited from AFObject.)
Public method
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.)
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method
IsTypeOf
Checks if the current AFBaseElement is derived from the specified AFElementTemplate.
Public method
Persist
This method returns the persistence string for the object.
(Inherited from AFObject.)
Public method
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.

Version Information

AFSDK


See Also

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