PCB Matrix Format
by Numerical Innovations, Inc. (www.numericalinnovations.com)
FOREACH array

MATRIX Array Level: 1

The FOREACH array element allows you to do looping.

Fields in the FOREACH array
Description
SELECT A reference to the selection set
Note
ForEach includes several Intrinsic variables: __index __total
FOREACH Intrinsic variables
Description
__index Current array iterator value starting at 0
__total Total size of the array.


XML example:

<forEach select="Set1">
<get type="aperture" result="@my_result" />
<MESSAGE>{{my_result}} Index {{__index}}</MESSAGE>
</forEach>
Outputs the following:
-----------------------
D38: Rectangle 35.40 Index 0
D46: Circle 40.00 Index 1
D13: Circle 60.00:45.00 Index 2
D13: Circle 60.00:45.00 Index 3
D13: Circle 60.00:45.00 Index 4
D13: Circle 60.00:45.00 Index 5
D15: Circle 50.00:45.00 Index 6
D38: Rectangle 35.40 Index 7
D28: Circle 68.90:19.70 Index 8
D46: Circle 40.00 Index 9
D15: Circle 50.00:45.00 Index 10