SourceDimension: IDimensionModel;
The SourceDimension property returns structure of calendar dimension for the modeling variable.
Executing the example requires that the repository includes a modeling container with the KONT_MODEL 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;
Variable: IMsVariable;
Lvl: IDimLevels;
i: Integer;
Begin
MB := MetabaseClass.Active;
Variable := MB.ItemByIdNamespace("VAR_1", MB.ItemById("KONT_MODEL").Key).Bind As IMsVariable;
Lvl := Variable.Sampling.SourceDimension.Levels;
For i := 0 To Lvl.Count - 1 Do
Debug.WriteLine(Lvl.Item(i).Name);
End For;
End Sub UserProc;
After executing the example, the console displays names of calendar levels that are present in variable frequency with the VAR_1 identifier.
See also: