Name(PrimaryKey: Variant): Variant;
PrimaryKey. Primary element key.
The Name property determines name of the element with the specified key.
Executing the example requires a standard cube with the CUBE_1 identifier.
Sub Main;
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 Main;
After executing the example a new element is created in element tree root.
See also: