Description

Extracts the path to an ancestor from a given path. This function supports any path that is delimited with the "\" character.

Return Type

A String value.   The unchecked path to the ancestor or vbNullString for an unattainable path.

Syntax

object.GetPathAncestorPath (sPath, lAncestorLevel)

The GetPathAncestorPath Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McDataManager.
sPathRequired. A String value. A given node path (Example: //Database\Folder\Node)
lAncestorLevelRequired. A Long value. 0 to -n where -1 is a parent (positive values are interpreted as negative).

Remarks

This function is efficient and ensures that the correct ancestor is chosen because it does not check the path against the path source. McDBNode name and ID paths as well as file system paths are supported.