Unable to add AF Attribute programatically to a AFElement derived from a template

Discussion created by neilg on Oct 2, 2012
Latest reply on Oct 3, 2012 by neilg



I am attempting to programatically add an attribute to an AFElement which is based on a Template. The Template is setup to Allow extensions.


However I am getting the following exception:
Cannot change the 'Attributes' property of Attribute 'Meter Data' in Element '0112CKHK' in Element 'METERS' in Element 'CZZ' in Element 'UnknownMeters' in Element 'Assets' because it is defined by its template.


I am able to do this manually through PI System Explorer but not via AKSDK.


AFSDK Version:




Dim dataSetAttr As AFAttribute = element.Attributes("Meters").Attributes.Add("test")


Thanks for your help.
Neil Goundar
Software Engineer
Dimension Software