AFAttribute Constructor (AFDatabase)
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Dynamically create an AFAttribute that is not associated
with an AFBaseElement and does not have a
AFDataReference configured.
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFAttribute( AFDatabase database )
Public Sub New ( database As AFDatabase ) Dim database As AFDatabase Dim instance As New AFAttribute(database)
public: AFAttribute( AFDatabase^ database )
new : database : AFDatabase -> AFAttribute
Parameters
- database
- Type: OSIsoft.AFAFDatabase
The AFDatabase associated with this new attribute. If , then the dynamically created attribute will not be associated with any AFDatabase.
Remarks
The dynamically created AFAttribute is not associated with an
AFBaseElement.
A dynamically created AFAttribute cannot be persisted to the server.
It does allow a DataReferencePlugIn to be assigned and
configured to obtain values using the DataReference.
| A dynamically created attribute should not contain any substitution strings in its configuration that are relative references to the attribute. For example, %ELEMENT%, %\ELEMENTID%, and |%ATTRIBUTE% will all return an empty string. Also, %ATTRIBUTEID% will return the dynamically generated ID of the attribute and will probably not be the desired value. |