The TabulatedDistance method creates a table of distances, similar to the tables found in atlases.
Syntax
object.TabulatedDistance( pHorizontalPIDs, pVerticalPIDs, SearchPIDInAllLayers )
Parameter |
Type |
Description |
pHorizontalPIDs |
Array of Variants |
required; locations for columns |
pVerticalPIDs |
Array of Variants |
required; locations for rows |
SearchPIDInAllLayers |
Boolean |
optional; true to include primary IDs from all layers |
Remarks
VB users can use ReDim to set the array size to the used size if necessary or use TabulatedDistance2. See Coordinate Arrays for more information about creating arrays in MapViewer.
Example
'TabulatedDistance
'Create a base map layer of California and assign it to the variable "BaseMap"
Set BaseMap = Plot.CreateBaseMap(FileName:=mvApp.ModuleFolder + "\Samples\CA2010.gsb")
'Create an array of four PIDs for the columns of the table
Dim colArray(3) As Variant
colArray(0) = "06001"
colArray(1) = "06003"
colArray(2) = "06005"
colArray(3) = "06007"
'Create an array of two PIDs for the rows of the table
Dim rowArray(1) As Variant
rowArray(0) = "06113"
rowArray(1) = "06115"
'Create a table of distances using the rows and columns specified above
Plot.TabulatedDistance(pHorizontalPIDs:=colArray(), pVerticalPIDs:=rowArray(), SearchPIDInAllLayers:=True)
Used by: PlotDocument object