Show contents 

Dimensions > Dimensions Assembly Interfaces > ICustomDimOrders > ICustomDimOrders.Move

ICustomDimOrders.Move

Syntax

Move(IndexFrom: Integer; IndexTo: Integer);

Parameters

IndexFrom. Attribute position index that should be moved.

IndexTo. Index of the position, to which attribute should be moved.

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;
    Cube: IStandardCube;
    CustDim: ICustomDimension;
    CustAtrs: ICustomDimAttributes;
    CustDimOrd: ICustomDimOrders;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("CUBE_SEP1").Edit;
    Cube := MObj As IStandardCube;
    CustDim := Cube.FactDimension.Dimension As ICustomDimension;
    CustAtrs := CustDim.Attributes;
    CustDimOrd := CustAtrs.Orders;
    CustDimOrd.Move(0, CustDimOrd.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:

ICustomDimOrders