Array Indices Object

By default, feature arrays are always one-dimensional arrays. If it is more convenient to treat a feature array as a multi-dimensional array, this can be done by using the array indices object.

The array indices object allows you to specify upper and lower bounds for multiple array dimensions.

Feature F1 is located inside a nested WHILE loop. The inner WHILE loop executes five times and the outer WHILE loop executes three times. At completion of execution, F1 has been executed 15 times and so 15 instances of F1 exist.

Consider the following example measurement routine segment:

ARRAY_INDICES/1..5,..
ASSIGN/V1=1
WHILE/V1<=3
ASSIGN/V2=1
WHILE/V2<=5
F1=FEAT/POINT,RECT
THEO/V2,V1,0,0,0,1
ACTL/1,1,0,0,0,1
MEAS/POINT,1
HIT/BASIC,V2,V1,0,0,0,1,1,1,0
ENDMEAS/
ASSIGN/V2=V2+1
COMMENT/REPT,"Location of F1["+V2+","+V1+"] :"+F1[V2,V1].XYZ
END_WHILE/
ASSIGN/V1=V1+1
END_WHILE/

This code segment creates a 3 X 5 grid of 15 measured points.

The array indices command has limited the first dimension of the feature array to be between 1 and 5 inclusively. Thus on the inspection report, instead of appearing as F1[1] – F1[15], the objects will appear as F1[1, 1] – F1[5, 3], more consistent with the layout of the features. Notice that the comment also refers to the feature array using a two dimensional array syntax.

To insert an array_indices object in a measurement routine:

  1. Using the keyboard, type "Array" on an empty line in the Edit window.

  2. Press the Tab key on your keyboard.

If the Display Brackets for Feature Arrays check box has been cleared, the feature will not appear with the bracketed name. See "Display Brackets for Feature Arrays" in the "Setting Your Preferences" chapter.