Resizing Arrays

You can resize an array either by adding multiple elements to the array simultaneously or by adding one element at a time.

Complete the following steps to resize an array structure.

  1. Use the Positioning tool to click the array shell border.
  2. Drag the corner of the array shell vertically or horizontally to add elements to the array.

To cancel a resizing operation, drag the array shell border past the front panel window before you release the mouse button. If the array or cluster is currently selected and you click an element rather than the array shell/cluster shell border before you drag, LabVIEW moves the entire array/cluster rather than resizing it.

Complete the following steps to increase the number of elements in an array.

  1. Right-click the index display and select Advanced»Show Last Element from the shortcut menu. This changes the index display to the index value of the last element in the array.
  2. Click the increment button on the index display to increment the index number of the dimension(s) you want to increase in size. You do not have to increase each dimension. For example, to increase a 2 x 2 x 10 array to 3 x 3 x 30, enter 2, 2, and 29 in the indexes to move to the new last position (2, 2, 29).
  3. Assign a value to the new last element. LabVIEW pads the elements between what was the old last element and the new last element with the scalar default value, which is usually 0.0.

If you want to shrink an array and preserve some or all the existing data values, cut or copy and paste the array cells or clear the array.