This example illustrates how to transverse the list of all entities in a vector layer, while printing out the value of the first field of each shape.
Code
local integer shape, integer layer
local integer tfid
tfid = DBOpen( GetPCIHOME() + "/demo/irvine.pix", "r")
layer = 31
shape = VECNextShape( tfid, layer, -1 )
while shape <> -1
print "Shape ",shape, " Field 1:",\
VECGetField( tfid, layer, shape, 1 )
shape = VECNextShape( tfid, layer, shape )
endwhile
call DBClose(tfid)
Shape 2 Field 1:13745700 Shape 3 Field 1:12600 Shape 4 Field 1:233100 Shape 5 Field 1:10800 Shape 6 Field 1:82194304
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.