NextElementInTree Property

Pageflex Document Action API

Pageflex Document Action API NextElementInTree Property
Namespaces > Pageflex.Scripting > Element > NextElementInTree
Gets the next Element in a depth-first traversal of the document tree.
Syntax
C# Visual Basic Managed C++
public Element NextElementInTree { get; }
Public ReadOnly Property NextElementInTree As Element
public:
Element^ NextElementInTree {
	Element^ get ();
}
Remarks
Returns the next tree Element, or nullNothingnullptr if this is the last element in the tree.

This method is useful for traversing a tree of document elements. For example:

 1static public uint CountElements()
 2
 3{
 4
 5    uint count = 0;
 6
 7    for (Element e = Application.CurrentDocument; e != null; e = e.NextElementInTree)
 8
 9        count++;
10
11    return count;
12
13}
Exceptions
Exception Condition
StaleScriptingObjectException This object's associated internal object no longer exists.

Assembly: PFScript Version: 8.0.7.1407 (Module: PFScript)