|
Description
VECQueryAttribute() is used to fetch a list of shape numbers for all shapes in a layer satisfying a provided boolean expression on the attribute fields.
Call Signature
int ptr VECQueryAttribute ( int/string filespec, int segment_num, string query_expr [, int ptr search_list [, int list_count] ] )
Return Value
int ptr
An array of integers which are the shape numbers of the shapes matching the search criteria.
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.
string query_expr:
The query expression (string) to be applied in this search.
[ int ptr search_list ]:
If this argument is present, this is an array of shape id's to restrict this search to. If missing, all shapes are tested.
[ int list_count ]:
If this argument is present, this is a count of the number of shape id's in the search_list. If missing, it is assumed that the entire search_list array should be used.
Remarks
The number of matching shapes can be established by taking the f$len() of the returned pointer. The returned array of shape arrays should be freed with EFree() when it is no longer needed.
See also
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.