| Maptitude GISDK Help |
Retrieves a listing and description of the fields in a view.
In Version 2013 added field types "Date", "Time", and "DateTime."
field_info = GetViewStructure(string view_name)
| Argument | Contents |
|---|---|
| view_name | Name of a view |
An array with one element for each field in the view. Each element is an array with the following structure:
| Element | Type | Contents |
|---|---|---|
| 1 | String | Field name |
| 2 | String | Field type: "String", "Integer", "Real", "Date", "Time", or "DateTime" |
| 3 | Integer | Number of characters (bytes) per record for this field in the file, i.e., the internal field width |
| 4 | Integer | Number of decimals |
| 5 | Boolean | A flag ("True" or "False") that indicates whether the field is internally (permanently) indexed |
All returned values describe the view, not the underlying table. As a result, functions such as RenameField() and SetFieldWidth() affect the returned values. To determine the structure of a table, use GetTableStructure() instead.
The returned array includes expression fields in the view.
GetViewStructure() can be used on joined views.
If the input view_name is null, GetViewStructure() uses the current view.
GetViewStructure() returns a field_info_array that can be used as an input to the CreateTable() function to create a new (emtpy) table with the same field characteristics.
| Error Type | Meaning |
|---|---|
| NotFound | The named view does not exist, or view_name is null and there is no current view |
| Function | Summary |
|---|---|
| GetTableStructure() | Gets a list and description of the fields in a table |
| CreateTable() | Creates an empty table and opens it as a view |
| RenameField() | Renames a field in a view |
| SetFieldWidth() | Changes the display width of a field |
| SetFieldDecimals() | Changes the number of displayed decimals for a real-typed field |
| ©2025 Caliper Corporation | www.caliper.com |