MoveTo(FromIndex: Integer; ToIndex: Integer);
FromIndex. Index of additional dimension position that must be moved.
ToIndex. Index of the position, to which the dimension must be moved.
The MoveTo method moves dictionary in the list of additional dimensions of the modeling variable.
Executing the example requires that the repository contains 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;
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.MoveTo(0, Dims.Count - 1);
MObj.Save;
End Sub UserProc;
After executing the example the first additional dimension of modeling variable is moved in the list to the last position.
See also: