The CreateBarMap method creates a bar map. The bar map properties are edited through the returned BarMap object.
Syntax
object. CreateBarMap( pVarCols, BoundaryFileName, DataFileName, DataTableName, BoundaryFileOptions, PIDCol )
Parameter |
Type |
Description |
pVarCols |
Array of Longs |
required; array of variable column numbers, column A equals 1 |
BoundaryFileName |
String |
optional; boundary file name |
DataFileName |
String |
optional; data file name |
DataTableName |
String |
optional; table name if a database file is used |
BoundaryFileOptions |
String |
optional; see Boundary File Options |
PIDCol |
Integer |
optional; number of primary ID column, column A equals 1 |
Remarks
VB users can use ReDim to set the array size to the used size if necessary or use CreateBarMap2.
Example
This example creates a bar map of Indiana.
Sub Main
'Declare the variable that will reference the application
Dim mvapp As Object
'Creates an instance of the MapViewer Application object
'and assigns it to the variable named " mvapp"
Set mvapp = CreateObject("MapViewer.Application")
'Make MapViewer visible
mvapp.Visible = True
'Declare Plot as Object
Dim Plot As Object
'Creates a new map window
Set Plot = mvapp.Documents.Add(mvDocPlot)
'Declare BarMap as object
Dim BarMap As Object
'Create a bar map
Dim pVarCols(1) As Long
pVarCols(0) = 4 : pVarCols(1) = 5
Set BarMap = Plot.CreateBarMap(pVarCols(), _
BoundaryFileName:= mvapp.ApplicationFolder + "\Samples\in2010.gsb", _
DataFileName:= mvapp.ApplicationFolder + "\Samples\in2010.dat", PIDCol:=1)
End Sub
Used by: PlotDocument object