The controls on the Vector tab of the Argument Details window are divided into groups:
This group defines the constraints that will be applied to the shape and size of the argument.
This drop-down allows you to constrain the direction of the
input vector. If you specify "Must be a column"
or "Must be a row" then the add-in function will return an error
such as Expected a column for X
if the constraint fails.
See also Argument.VectorDirection property.
Use this combo-box to constrain the size of the argument.
If you type in an integer, then the vector must contain exactly that number of items or the input will be rejected by the add-in function, with a message such as "Expected 3 cells for X".
If the property contains a name, then a variable of that name will be instantiated in the add-in functions, and the validation code will set it to the size of the array. If the variable has already been set, then it will be tested. If the size is different from the value of the variable, then the input will rejected, with a message such as "Expected 3 cells for X". By using the same bounding variable for two arrays, you can constrain multiple inputs to have the same size, width or height.
If your function has other inputs that are vectors or matrices, then the drop-down list will contain a list of their bounds, so that you can immediately bind the size of this vector to the size of another vector or matrix.
See also Constraining the size of an argument in the User Guide.
If the combo-box is left empty (the default) then there are no constraints on the size of the array.
Check this box if your function should reject vectors that contain zero values.
If the user supplies an empty range as the input, then
the function will return an error message such as
Expected at least one value for X
.
This group controls how the validation code will detect the edges of the vector within the input range.
The behavior of this group of flags is also dependent on the Fill settings.
If Fill is set to "Do not fill" then truncation occurs at the first empty/blank/zero cell and all cells after the empty cell are ignored, even if they are not empty
If Fill is set to "Fill used area", then the array is truncated after the cell that is not empty/blank/zero. Empty cells before the last empty/blank/zero cell are filled with the Fill value.
If Fill is set to "Do not fill", the array is truncated at the first empty cell. All cells after the empty cell are ignored, even if they are not empty.
If Fill is set to "Fill used area", then the array is truncated after the last non-empty cell. Empty cells before the last empty cell are filled with the Fill value.
If Fill is set to "Do not fill", the array is truncated at the first blank cell. All cells after the blank cell are ignored, even if they are not blank.
If Fill is set to "Fill used area", then the array is truncated after the last non-blank cell. Blank cells before the last blank cell are filled with the Fill value.
A formula such as =""
will produce a blank cell.
If Fill is set to "Do not fill", the array is truncated at the first zero cell. All cells after the zero cell are ignored, even if they are not zero.
If Fill is set to "Fill used area", then the array is truncated after the last non-zero cell. Zero cells before the last zero cell are filled with the Fill value.
This control allows you to specify the C++ container class into which the argument's values will be copied.
If you leave it blank, then the default container class (as defined by the DefaultVectorContainer setting) will be used.
For details of the notation to be used for the container class, see Argument.ContainerClass.
The controls in this group control how the validation code deals with empty cells.
This control allows you to control what will be done with input cells that are considered to be empty.
The following values are supported:
This is the value which will be used to fill empty cells if the Fill Type is not set to "Do not fill". It should be a valid C++ expression that can be used to set the target type.
If the Fill Type is not "Do not fill", then empty cells will be set to the fill value.
If the Fill Type is not "Do not fill", then blank cells will be set to the fill value.
If the Fill Type is not "Do not fill", then cells containing the value zero will be set to the fill value.
The controls in this group control how the size of the array is measured.
If this box is checked then the target vector will have an empty cell at its start. This is useful if you are passing values to code written for 1-based vectors, such as some Basic, Fortran or Lisp compilers.
If a constraint has been set on the size of the vector then this control modifies how the size is calculated. This size is compared to the value of the upper bound specified in the Size control.