Maptitude GISDK Help |
Creates vectors from fields in a view|set.
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.
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 |
An array of vectors with the desired values.
GetDataVectors() displays a progress bar when getting a large number of records. To add a Cancel button to the progress bar, precede the function call with an "on escape" clause. For more information, see Error Handling.
An example of a Sort Order option: {{"Sort Order",{{Field1,"Ascending"},{Field2,"Descending"}}}}
For more information on vectors, see Vectors.
A "DateTime" field can only become a "DateTime" vector. Otherwise, the Type option allows certain type conversions:
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" |
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})
GISDK Function |
Summary |
Copies an array to a vector |
|
Copies a vector to a new vector |
|
Constructs a cumulative vector in a new vector |
|
Concatenates vectors into one, combined long vector |
|
Creates a vector from a field in a view|set |
|
Fills values into a field in a view|set from a vector |
|
Fills values into fields in a view|set from vectors |
|
Sorts the elements of a vector in ascending order |
|
Sorts an array of vectors in ascending order, based on the first vector |
|
Transposes an array of arrays, where element b[i][j] = a[j][i] |
|
Creates a vector |
|
Computes a given statistic for the vector |
|
Copies a vector to an array |
©2025 Caliper Corporation | www.caliper.com |