BranchLevel

See also: ParentID, VariableID

Syntax


BranchLevel, or
BranchLevel(Branch:Variable)

Description

Returns the level (depth in the tree) of either the current branch or the specified branch:variable reference.  This function can be useful when you need to pass information about the LEAP tree structure to an external script or DLL.  The root or area branch is always level zero whether visible or not.  Demand, Transformation, Resources, Non-Energy sector branches etc. are level 1.

Example

BranchLevel(Freedonia) = 0
BranchLevel(Demand) = 1
BranchLevel(Demand\Househol) = 2