Maptitude GISDK Help

GetDataVector()

Summary

Creates a vector from a field in a view|set.

 

Changes

Added to Version 6.0/2012. In Version 2017 expanded types and allowable type conversions.

 

Syntax

v = GetDataVector(string viewset, string field, array options)

 

Argument Contents
viewset The name of the view|set
field The name of the field

 

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 String The type of the vector, which can be "Double", "Float", "Long", "Short", "String", or "DateTime"; the default is the type of the field
Missing as Zero Boolean If "True" missing values are replaced with zeros in the result vector; the default is "False"

 

Returns

A vector 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"

 

Example

folder = RunMacro("G30 Tutorial Folder")

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

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

ShowArray({v})

 

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
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

 

 

©2025 Caliper Corporation www.caliper.com