IMsVariableDimensions.Add

Syntax

Add(Dimension:  IDimensionModel): IMsVariableDimension;

Parameters

Dimension. Structure of dictionary that must be added.

Description

The Add method adds an additional dictionary to modeling variable structure.

Example

Executing the example requires that the repository contains a modeling container with the KONT_MODEL identifier and a dictionary with the D_SRC identifier. The container includes a modeling variable with the VAR_1 identifier.

Add links to the Dimensions, Metabase, and Ms system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Variable: IMsVariable;
    ScenInst: IDimInstance;
    Dims: IMsVariableDimensions;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemByIdNamespace("VAR_1", MB.ItemById("KONT_MODEL").Key).Edit;
    Variable := MObj As IMsVariable;
    Dims := Variable.Dimensions;
    Dims.Add(MB.ItemById("D_SRC").Bind As IDimensionModel);
    MObj.Save;
End Sub UserProc;

After executing the example the repository dictionary with the D_SRC identifier is added to the list of dimensions of the modeling variable with the VAR_1 identifier.

See also:

IMsVariableDimensions