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
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. |
See Also
Assembly: PFScript Version: 8.0.7.1407 (Module: PFScript)