Up to 4 dimensions of optional index selectors may be supplied for vector data. If selectors are supplied, then the selected sub-array is assigned to as the left-hand operand for the assignment. The dimension selector may be a single, scalar index value or it may be an array of such values; negative indices in a selector are legal, but they are ignored. If the selector for a dimension is missing (VT_EMPTY, VT_ERROR or VT_NULL) then all elements of that dimension will be selected.
For N-dimensional shaped LeftOperand Variant's or McObject's, it is possible to supply selector values as indexes into the shape unwrapped into 1-dimensional array. This is done by supplying only the varSelector0 argument (leaving the other arguments missing) and supplying it as a N-dimensional array (if varSelector0 is supplied as a scalar or 1-D array, then it selects only from Dimension 0). The result of selecting in this way is a 1-dimensional array of the selected elements. This situation is actually a very common one, since the logical vector operators (e.g., McOMGlobal.McOpEq) preserve the shape of the left argument. The samples illustrate this and other selection rules: they are well worth examining if you are selecting from anything but 1-dimensional arrays.
The selector arguments are supplied in C/C++ order for multidimensional shaped objects. That is, the left-most argument selects into Dim0, the slowest moving dimension. This is the same ordering as in C/C++, but it is the reverse of dimension ordering in VB.
On assignment, if all selector values are missing, then variable dimensions are allowed to change size on the assignment to accomodate the source data, but the number of dimensions is not allowed to change nor is the fixed or variable attribute of each dimension. Assigning to the Value property of a McObject sets the full shape of the stored data, as does assigning a shape directly to the McObject.Shape property.