Vector Functions (Magic xpa 3.x)
The Magic xpa Vector is an array that lets you store and retrieve data from a specified cell index. The Vector attribute is based on the BLOB attribute with an additional cell model property.
The Vector cell must be specified from a Magic xpa field model, as defined in the Model repository. .NET variables cannot be used as a Cell Model.
Vector indexing starts from one. The Vector attribute can only be selected from Virtual and Parameter fields. You cannot directly store vectors in a table.
You can also retrieve two-dimensional arrays using a vector field whose cell model is also a vector.
You cannot use the same vector model as its type, such as: Vector Cell 2 Cell Model: Vector Cell 2
Recursive vector definitions are not supported. You cannot put a Vector variable on a GUI or Browser form. It is not recommended to store large amounts of data in a vector because the array is stored in the computer’s memory.
You can access and modify the vector cells by using the vector functions described below.
BufGetVector – Converts a value stored in a specified position in a buffer to a Magic xpa vector value.
BufSetVector – Converts a Magic xpa Vector value into one of the supported storages at a specified position in the buffer.
VecCellAttr – Returns the vector's cell attribute.
VecSet – Updates the value of a selected cell with a given vector.
VecGet – Returns the value of a specified cell.
VecSize – Returns the number of cells for the given vector.