Inserts an element or subarray into n-dim array at the point you specify in index.

When you wire an array to this function, the function resizes automatically to display index inputs for each dimension in the array. If you do not wire any index inputs, the function appends the new element or subarray to the end of the n-dim array. If the index input is larger than the array size, the function does not insert anything into the input array.


icon

Inputs/Outputs

  • c1ddbl.png array

    n-dim array is the array in which you want to insert an element, row, column, page, and so on. This input can be an n-dimension array of any type.

  • ci32.png index

    index 0..n-1 specifies the point in the array at which you want to insert the element, row, column, page, and so on. You can wire only one index input.

    For example, to insert a 1D array as the fourth row of a 2D array, wire 3 to the first index input, and the second index input becomes disabled. To insert the array as the fourth column of the 2D array, wire 3 to the second index input, and the first index input becomes disabled.
  • cdbl.png new element/subarray

    n or n-1 dim array is the element, row, column, or page you want to insert into the array specified in n-dim array.

  • ipoly.png output array

    output array is the array this function returns with the inserted element(s), row(s), column(s), or page(s).

  • Note The base data type of the new element or array must be the same type as the input array. For example, if the input array contains Boolean control references, then the new element must be a Boolean control reference. Use the To More Generic Class function when you create the input array if you want to insert more generic elements into the array.

    This function resizes the array along only one dimension. Therefore, you can wire only one index input. The index you wire determines the dimension along which you can insert. For example, to insert row(s), wire the row index, or to insert column(s), wire the column index.

    The array you wire to n or n-1 dim array must be the same dimension or a dimension less than the one you wired to n-dim array. For example, you cannot insert a single element into a 2D array, and you cannot insert a single row (a 1D array) into a 3D array. You can, however, insert a 2D array that has a single row into a 3D array. LabVIEW pads the resulting array as necessary.

    FPGA Module Details

    The following details apply when you use this object in an FPGA VI.

    Note The following details are subject to change with each version of the LabVIEW FPGA Module.
    Single-Cycle Timed Loop Supported.
    Usage If the index input is beyond the range of the array into which you are inserting elements, this function does not insert anything into the input array. The LabVIEW FPGA Module supports only one-dimensional arrays that resolve to a single size at compile time. The index input must be constant so that LabVIEW can determine the size of the output array. You can either wire constant values directly to this function, or rely on value propagation through constant folding.
    Timing This function requires no clock cycles to execute because it does not include an internal register.
    Resources This function consumes no FPGA resources because it is purely a wiring operation.