IDimOrders.Move

Syntax

Move(IndexFrom: Integer; IndexTo: Integer);

Parameters

IndexFrom - index of position from which the attribute is to be moved.

IndexTo - index of position to which the attribute is to be placed.

Description

The Move method changes attributes' positions in sorting list thus changing priority of sorting by some attribute.

Example

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    DimModel: IDimensionModel;
    DimAttrs: IDimAttributes;
    DimOrd: IDimOrders;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("D_TO").Edit;
    DimModel := MObj As IDimensionModel;
    DimAttrs := DimModel.Attributes;
    DimOrd := DimAttrs.Orders;
    DimOrd.Move(0, DimOrd.Count - 1);
    MObj.Save;
End Sub UserProc;

After executing the example the first attribute in the sorting list is moved to the last position.

See also:

IDimOrders