Move(IndexFrom: Integer; IndexTo: Integer);
IndexFrom. Position index of the attribute to be moved.
IndexTo. Position index to which attribute is to be moved.
The Move method changes attributes' positions in sorting list thus changing priority of sorting by some attribute.
Sub Main;
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 Main;
After executing the example the first attribute in the sorting list is moved to the last position.
See also: