IMetabaseObjectDescriptors.Add

Syntax

Add: IMetabaseObjectDescriptor;

Description

The Add method adds the object description to the collection.

Comments

In the following implementation this method is available only for the manipulation of the collection of objects that are copied with the time series database.

Example

Executing the example requires that the repository contains a time series database with the FC identifier.

Add links to the Cubes, Metabase system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    RubUpdateEx: ICubeMetaUpdateEx;
    Rub: IRubricator;
    Progress: IMetabaseUpdateProgress;
    CrInfo: IMetabaseObjectCreateInfo;
    s: string;
    ObjectsF: IMetabaseObjectDescriptors;
    ObjF: IMetabaseObjectDescriptor;
    i: Integer;
Begin
    mb := MetabaseClass.Active;
    RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
    Rub := mb.ItemById("FC").Bind As IRubricator;
    RubUpdateEx.Rubricator := Rub;
    RubUpdateEx.Metabase := Mb;
    CrInfo := RubUpdateEx.CreateInfo;
    CrInfo.Parent := mb.Root;
    s := Mb.GenerateId("FC_COPY");
    CrInfo.Id := s;
    CrInfo.Name := s;
    RubUpdateEx.CopyExtraObjects := True;
    ObjectsF := RubUpdateEx.ObjectsFilter;
    ObjF := Rub.Container(RubricatorContainerType.Data);
    ObjectsF.Add(ObjF);
    For i := 0 To ObjF.Children.Count - 1 Do
        ObjectsF.Add(ObjF.Children.Item(i));
    End For;
    RubUpdateEx.RdsDatabase := Rub.Database;
    RubUpdateEx.Apply(Progress);
End Sub UserProc;

After executing the example, the FC time series database is copied to the repository root. Copy identifier - FC_COPY. Only the nested objects, which description is contained in the ObjectsF collection, are copied.

See also:

IMetabaseObjectDescriptors