IMetabaseObjectDescriptors.RemoveByKey

Syntax

RemoveByKey(Key: Integer): Boolean;

RemoveByKey(Key: uinteger): boolean;

Parameters

Key. Object description key.

Description

The RemoveByKey method removes the description of the object from the collection by its key. The method returns True if removal is successful.

Comments

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

Example

Executing the example requires that the repository contains a replication object with the CUBE_META_UPD identifier.

Add links to the Cubes, Metabase system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    u: ICubeMetaUpdateEx;
    ObjectsFilter: IMetabaseObjectDescriptors;
    MSKey: Integer;
Begin
    Mb := MetabaseClass.Active;
    u := Mb.ItemById("CUBE_META_UPD").Edit As ICubeMetaUpdateEx;
    ObjectsFilter := u.ObjectsFilter;
    If ObjectsFilter.Count > 0 Then
        Debug.WriteLine(ObjectsFilter.RemoveByKey(MSKey));
    End If;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Cubes;
 
Public Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    u: ICubeMetaUpdateEx;
    ObjectsFilter: IMetabaseObjectDescriptors;
    MSKey: UInteger;
Begin
    Mb := Params.Metabase;
    u := Mb.ItemById[
"CUBE_META_UPD"].Edit() As ICubeMetaUpdateEx;
    ObjectsFilter := u.ObjectsFilter;
    
If ObjectsFilter.Count > 0 Then
        System.Diagnostics.Debug.WriteLine(ObjectsFilter.RemoveByKey(MSKey));
    
End If;
End Sub;

After executing the example, the data folder in the replication object is removed from the collection of the nested objects of time series database being copied.

See also:

IMetabaseObjectDescriptors