|
Description
VECGetField() is used to read the value from an attribute field associated with a shape in a vector layer.
Call Signature
string/int ptr VECGetField ( int/string filespec, int segment_num, int shape, int field )
Return Value
string/int ptr
Note that the return type from VECGetField depends on the type of field being read. For Example, a field of type String will result in VECGetField returning a string, while a field of type CountedInt will result in VECGetField returning a pointer to an array of integers.
Arguments
int/string filespec:
This can either be the handle returned by DBOpen(), or the name of an open file.
int segment_num:
The vector layer (segment) number being accessed.
int shape:
The vector shape being accessed.
int field:
The field number to access. Field numbering starts at one.
Remarks
Do not free CountedInt arrays returned. The pointer returned does not point to a copy of the data, but the actual data. This behavior is different from that of VECGetVertices which returns a copy which must be freed.
See also
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.