Maptitude GISDK Help

GetDataVectors()

Summary

Creates vectors from fields in a view|set.

 

Changes

Added to Version 6.0/2012. Added Return Options Array option to Version 2013. In Version 2017 expanded types and allowable type conversions. Added options as synonym for Return Options Array option to Version 2019.

 

Syntax

a = GetDataVectors(string viewset, array fields, array options)

 

Argument Contents
viewset The name of the view|set
fields An array with the names of the fields

 

Options Type Contents
Sort Order Array An array of arrays with two strings, the name of the field and "Ascending" or "Descending," for each field in the sort order
Row Based Boolean "True" (the default) means v.rowbased will be "True"; "False" means v.columnbased will be "True"
Column Based Boolean "True" means v.columnbased will be "True"; "False" (the default) means v.rowbased will be "True"
Type Array An array of strings with the type of each vector, which can be "Double", "Float", "Long", "Short", "String" or "DateTime"; the defaults are the types of the fields
Missing as Zero Boolean If "True" missing values are replaced with zeros in the result vector; the default is "False"
Return Options Array Boolean If "True" return an array of options with the result vector; the default is "False"
options Boolean Same as Return Options Array

 

Returns

An array of vectors with the desired values.

 

Notes

Field Type Vector Type
Any numeric ("Double", "Float", "Long",or "Short") Any numeric ("Double", "Float", "Long",or "Short")
Any type except "DateTime" "String"
"String" Any type except "DateTime"

 

Examples

folder = RunMacro("G30 Tutorial Folder")

view_name = OpenTable("Customer", "DBASE", {folder + "customer.dbf",})

v = GetDataVectors(view_name+"|", {"SALES", "ZIP"}, {{"Sort Order", {{"ZIP", "Ascending"}}}} )

ShowArray({v})

 

opts = {}

opts.[Return Options Array] = True

v = GetDataVectors(GetView() + "|", {"Side", "Mode", "Capacity"}, opts)

mode = v.Mode

ShowArray({mode})

 

See Also

GISDK Function Summary
ArrayToVector() Copies an array to a vector
CopyVector() Copies a vector to a new 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
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

 

 

©2025 Caliper Corporation www.caliper.com