Show contents 

Dimensions > Dimensions Assembly Interfaces > ICustomDimTree > ICustomDimTree.Name

ICustomDimTree.Name

Syntax

Name(PrimaryKey: Variant): Variant;

Parameters

PrimaryKey. Primary element key.

Description

The Name property determines name of the element with the specified key.

Example

Executing the example requires a standard cube with the CUBE_1 identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Cube: IStandardCube;
    CustDim: ICustomDimension;
    CustDimTree: ICustomDimTree;
    v: Variant;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("CUBE_1").Edit;
    Cube := MObj As IStandardCube;
    CustDim := Cube.FactDimension.Dimension As ICustomDimension;
    CustDimTree := CustDim.Tree;
    v := CustDimTree.Add(Null);
    CustDimTree.Name(v) := "New element " + v;
    MObj.Save;
End Sub UserProc;

After executing the example a new element is created in element tree root.

See also:

ICustomDimTree