GetAllPathsToMember

Returns an array of strings that represent the possible paths in a dimension’s hierarchy to a given member.

Syntax

<IHsvTreeInfo>.GetAllPathsToMember lMemberID, varabstrPaths

Argument

Description

lMemberID

Long (ByVal). The member ID of the member for which you want to return the hierarchical paths.

varabstrPaths

Variant. Returns an array of strings that represent the hierarchical paths to the member. The array contains an item for each path to the member.

The members in these strings are delimited by backslashes ( \ ), as shown in the following examples for a member named “Connecticut”:

    \Regional\UnitedStates\Connecticut

    \Management\Imbler\Connecticut

Example

The following function takes an entity’s name and returns the possible paths to the entity.

Function getEntityHierarchy(sEntity As String) As Variant
Dim cTreeInfo As IHsvTreeInfo, vaPaths As Variant, lId As Long
Set cTreeInfo = m_cMetadata.Entities
lId = cTreeInfo.GetItemID(sEntity)
cTreeInfo.GetAllPathsToMember lId, vaPaths
getEntityHierarchy = vaPaths
End Function