HasHierarchy: Boolean;
The HasHierarchy property determines whether attribute is used as alternative hierarchy.
Available values:
True. Attribute is used as alternative hierarchy;
False. Attribute is not used as alternative hierarchy.
Executing the example requires that repository contains cube with the CUBE_SEP_PARAMS identifier. Determine list of facts and its hierarchy for cube without using existing dictionary.
Add links to the Cubes, Dimensions, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
cube: IStandardCube;
customdim: ICustomDimension;
attrs: ICustomDimAttributes;
attr: ICustomDimAttribute;
Begin
// Get repository
mb := MetabaseClass.Active;
// Get cube
cube := mb.ItemById("CUBE_SEP_PARAMS").Edit As IStandardCube;
// Get facts dimension
customdim := cube.FactDimension.Dimension As ICustomDimension;
// Get collection of dimension attributes
attrs := customdim.Attributes;
// Get the Order facts dimension attribute
attr := attrs.Order;
// Set attribute as alternative hierarchy
attr.HasHierarchy := True;
// Save changes
(customDim As IMetabaseObject).Save;
End Sub UserProc;
After executing the example facts dimension will be used as alternative hierarchy.
See also: