CopyVector()

Summary

Copies a vector to a new vector.

Changes

Added to Version 6.0/2012.

Syntax

new_vec = CopyVector(vector vec)

Argument Contents
vec The vector to be copied

Returns

A new vector with a copy of the original vector.

Notes

  • For more information on vectors, see Vectors.

Example

vec = Vector(10, "long", {{"Sequence", 1, 1}})
new_vec = CopyVector(vec)
new_vec = new_vec * 2
ShowArray({vec, new_vec})

See Also

GISDK Function Summary
ArrayToVector() Copies an array to a vector
CumulativeVector() Constructs a cumulative vector in a new vector
ConcatenateVectors() Concatenates vectors into one, combined long vector
GetDataVector() Creates a vector from a field in a view|set
GetDataVectors() Creates vectors from fields in a view|set
SetDataVector() Fills values into a field in a view|set from a vector
SetDataVectors() Fills values into fields in a view|set from vectors
SortVector() Sorts the elements of a vector in ascending order
SortVectors() Sorts an array of vectors in ascending order, based on the first vector
TransposeArray() Transposes an array of arrays, where element b[i][j] = a[j][i]
Vector() Creates a vector
VectorStatistic() Computes a given statistic for the vector
VectorToArray() Copies a vector to an array