IMsVariable.Sampling

Syntax

Sampling: IMsVariableSampling;

Description

The Sampling property returns settings used to calculate step in variable structure.

Example

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Variable: IMsVariable;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemByIdNamespace("Var_1", MB.ItemById("KONT_MODEL").Key).Edit;

Variable := MObj As IMsVariable;

Variable.Sampling.Level(DimCalendarLevel.Year) := True;

Variable.Sampling.Level(DimCalendarLevel.HalfYear) := True;

MObj.Save;

End Sub Main;

After executing the example, as the calculation step for modeling variable with the Var_1 identifier, the Years and Half-years are used.

See also:

IMsVariable