Description

The closest “ancestor” McObject with a given TagNumber or the “root” ancestor McObject.

Property type

A McObject object.  

Syntax

object.AncestorMcObject([lTagNumber])

The AncestorMcObject Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McObject.
lTagNumberOptional. A Long value.

The TagNumber property of the ancestor being sought, or zero if the root ancestor is desired.

Remarks

An “ancestor” is some McObject in the chain of ParentMcObject's leading back to the root. The “root” object is the ancestor whose own ParentMcObject is NULL (i.e., it has no parent). The chain of ParentMcObject properties is searched until an ancestor matching the given lTagNumber argument is found or until the root ancestor is found if lTagNumber is zero.

The property is exposes the ancestor McObject matching the given lTagNumber or the root ancestor if lTagNumber is zero. NULL is returned if a matching ancestor cannot be found or if lTagNumber is zero and this object is already a root object (has a NULL ParentMcObject).