Remove(Index: Integer): Boolean;
Index. Object index in the collection.
The Remove method removes the object from the collection by its index.
The value of the Index parameter must be non-negative but it is less than the value of the ICubeMetaUpdateAdditionalObjects.Count property. Index of the first object in the collection is 0, index of the last object in the collection is equal to ICubeMetaUpdateAdditionalObjects.Count that is -1. Index numbering is continuous.
If the object was removed successfully, the method returns True, the value of the ICubeMetaUpdateAdditionalObjects.Count property is reduced by one; otherwise the method returns False.
Executing the example requires that the repository contains a replication object with the CUBE_META_UPD identifier. Add links to the Cubes and Metabase system assemblies.
Sub Button3OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Mb: IMetabase;
Update: ICubeMetaUpdateEx;
AdditionalObjs: ICubeMetaUpdateAdditionalObjects;
AddObj: Boolean;
Begin
Mb := MetabaseClass.Active;
Update := Mb.ItemById("CUBE_META_UPD").Edit As ICubeMetaUpdateEx;
AdditionalObjs := Update.AdditionalObjects;
AddObj := AdditionalObjs.Remove(1);
If AddObj Then
Debug.WriteLine(Object is removed.);
Else
Debug.WriteLine(Object is not removed);
End If;
(Update As IMetabaseObject).Save;
End Sub Button3OnClick;
After executing the example the console window displays the result of removing the object with the 1 index that belongs to the list of objects copied together with the time series database.
See also: