treeIterator

Synopsis

Creates an iterator object starting at part suitable for use in For Each statements. Optionally allows iteration over rules other than the children rule, and permits different iteration directions.

When used in For Each statements, the iterate( ) function is called internally, and should not be called directly in the rules .

Syntax

treeIterator ( part As Part, _
               Optional childRule As Name = :children, _
               Optional iterationStyle As Name = :TopDown ) As User 
Argument Type Description
part Part The part which represents the root of the tree to be iterated over. This is included in the iteration.
childRule Name Optional; the name of the rule which should be called on each Part to get the Parts below it in the tree; default is :children.
iterationStyle Name Optional; the iteration method
  • :TopDown begins iteration at part (default)
  • :BottomUp begins iteration at the leaves
  • :Unknown lets the system determine the order