The RecordsInRegions method selects or deselects objects and reports statistics of records in regions.
Syntax
object.RecordsInRegions( PartiallyInRegion, ReportStatistics, WksCol, ReportRecord, SelectScope, PIDName )
Parameter |
Type |
Description |
PartiallyInRegion |
Boolean |
optional; true to include boundaries that partially touch the zone |
ReportStatistics |
Boolean |
optional; true to report statistics |
WksCol |
Integer |
optional; select data column for statistics, column A equals 1 |
ReportRecord |
Boolean |
optional; true to create a report for the specified boundary |
SelectScope |
optional; select or deselect boundaries |
|
PIDName |
String |
optional; primary ID of boundary record to copy or boundary to select/deselect with SelectScope |
Remarks
Define a region using the DefineRegionArea, DefineRegionByPID, DefineRegionCircle, DefineRegionRectangle methods before using RecordsInRegions.
Example
This example shows how to obtain information from a hatch map.
'Creates a hatch map object and assigns it to the variable named "HatchMap"
Set HatchMap = Plot.CreateHatchMap( BoundaryFileName:= mvApp.ApplicationFolder + _
"samples\co2010.gsb", DataFileName:= mvApp.ApplicationFolder + "samples\co2010.dat", _
PIDCol:=1, VarCol:=5, NumClasses:=4)
'Define region
Set MapShapes = CurrentLayer.Shapes
MapShapes.DefineRegionCircle(Left:=3, Top:=5, Right:=9, Bottom:=2)
'Select boundaries in region, report statistics, report on one boundary
CurrentLayer.RecordsInRegions(PartiallyInRegion:=True, ReportStatistics:=True, _
WksCol:=3, ReportRecord:=True, SelectScope:=mvSelectScopeSelectAll, PIDName:="08119")
Used by: Layer object