Knowledge Base Article
KB10718 - How do I use the DK to implement the selection of objects on the map with an extent defined by a selection rectangle?
To find all shapes within a given extent:
GIS.Lock // to avoid multiple refreshed
Shp := layer.FindFirst( selection_extent )
While Assigned( shp ) do begin
Shp.MakeEdiable.isSelected := True ;
Shp.Invalidate
End ;
GIS.Unlock // or pending updates will now be forced
The logic to implement a selected extent is to count all the selected shapes:
sel_extent :=GisNoWorld ;
Shp := layer.FindFirst( selection_extent, ‘GIS_SELECTD=TRUE’ ) )
While Assigned( shp ) do begin
Sel_xtent := GisCommonExtent( sel_extent, shp.Extent ) ;
End ;
Created: 2006-10-10, Modified: 2010-03-30
|