VECGetSelection()

  VECGetSelection, VECRemoveSelection, and VECSetSelection

Description

VECGetSelection() is used to retrieve the shapeids of the currently selected vectors in the indicated layer.

Call Signature

int ptr VECGetSelection ( int/string filespec, int segment_num )

Return Value

int ptr

The result is a pointer to an array of integer shapeids. The number of entries can be determined with f$len(). The list of shapeids should be freed with EFree() when no longer needed to avoid a memory leak.

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.

Remarks

Vector selection is primary used within interactive environments, but is associated with the underlying file so that it can be easily shared between unrelated tools.

Vector selection is not saved in files.

See also

GDB file functions

GDB vector file functions

VECSetSelection()

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.