Add(Value: IMetaAttributeParamItem);
Value. Parameter to be added to the collection.
The Add method adds the specified parameter to the collection.
Executing the example requires a form with the Button1 button and the MetaAttributesBreadcrumb component named MetaAttributesBreadcrumb1. The MetaAttributesBreadcrumb1 component is linked to a time series database.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Setting: IMetaAttributeSetting;
AttrParam: IMetaAttributeParamItem;
Begin
Setting := MetaAttributesBreadcrumb1.MetaAttributeSettings.FindById("DL");
//Set up parameter
AttrParam := New MetaAttributeParamItem.Create;
AttrParam.Id := "Param1";
AttrParam.Key := 1;
AttrParam.Name := "Period 1";
AttrParam.Tag := "Day;Week";
AttrParam.Visible := True;
//Add parameter to collection
Setting.MetaParamItemsCollection.Add(AttrParam);
//Set up parameter
AttrParam := New MetaAttributeParamItem.Create;
AttrParam.Id := "Param2";
AttrParam.Key := 2;
AttrParam.Name := "Period 2";
AttrParam.Tag := "Month;Year";
AttrParam.Visible := True;
//Add parameter to collection
Setting.MetaParamItemsCollection.Add(AttrParam);
//Set the first parameter as attribute value
Setting.SelectedParam := Setting.MetaParamItemsCollection.FindById("Param1");
End Sub Button1OnClick;
Clicking the button creates two parameters for the Period attribute. The first parameter is set as attribute value.
See also: