Maptitude GISDK Help |
Creates a vector from a field in a view|set.
Added to Version 6.0/2012. In Version 2017 expanded types and allowable type conversions.
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" |
A vector with the desired values.
GetDataVector() 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 = GetDataVector(view_name+"|", "SALES", {{"Sort Order", {{"ZIP", "Ascending"}}}} )
ShowArray({v})
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 vectors from fields 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 |