XMLAHierarchyList
In an XMLA context, each dimension potentially has a list of
hierarchies. To store these lists, you use the
XMLAHierarchyList
data type in BI#. This example code
prints the number of hierarchies for each dimension that belongs to an XMLA
connection:
#define EngineVersion 5.0
#define RuntimeVersion 5.0
void XmlaPrintHierarchies(XMLAConnection connection)
{
XMLACubeList cubes = XMLAGetCubeList(connection);
foreach (XMLACube cube in cubes)
{
XMLADimensionList dimensions = XMLAGetDimensionList(cube);
WriteLine("Found cube " + XMLAGetCubeName(cube) + ". It has " + Count(dimensions) + " dimensions.");
foreach (XMLADimension dimension in dimensions)
{
XMLAHierarchyList hierarchies = XMLAGetHierarchyList(dimension);
WriteLine(" Found dimension " + XMLAGetDimensionName(dimension) + ". It has " + Count(hierarchies) + " hierarchies.");
}
}
}