Add(Attribute: IMetaAttribute): Integer;
Attribute is an attribute being added.
The Add method adds an attribute and returns its index in collection.
Executing the example requires a form with the Button1 button, the TabSheetBox component and the UiErAnalyzer component named UiErAnalyzer1 that is a data source for TabSheetBox. Working area of the time series database must be loaded to UiErAnalyzer1. The repository must contain time series databases. Click the button to start executing this example.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ErAn: IEaxAnalyzer;
Laner: ILaner;
Rubrikator: IRubricator;
Attr: IMetaAttributes;
LanerAttr: ILanerAttributes;
Begin
ErAn := UiErAnalyzer1.ErAnalyzer;
Laner := ErAn.Laner;
Laner.BeginUpdate;
Rubrikator := Laner.RubricatorInstance.Rubricator;
Attr := Rubrikator.Facts.Attributes;
LanerAttr := Laner.Attributes;
If LanerAttr.Count > 0 Then
LanerAttr.Clear;
End If;
LanerAttr.Add(Attr.FindById("REV"));
Laner.EndUpdate;
End Sub Button1OnClick;
After executing this example, data table displays the additional attribute Revision.
See also: