CreateMultiGraphMap

The CreateMultiGraphMap method creates a multi-graph map. The multi-graph map properties are edited in the returned MultiGraphMap object.

 

Syntax

object. CreateMultiGraphMap(BoundaryFileName, DataFileName, DataTableName, BoundaryFileOptions, PIDCol, XCol, YCol)

 

Parameter

Type

Description

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

XCol

Integer

optional; number of X data column, column A equals 1

YCol

Integer

optional; number of Y data column, column A equals 1

 

 

Example

This example creates a multi-graph map of Indiana. First, create a data file to use with the multi-graph map. The data file should contain PID, X data, and Y data columns. The example assumes the data are in columns A, B, and C. Also, the user created  "mgmap.bln" data file is saved on the Public Desktop. Change the DataFileName, PIDCol, XCol, and YCol parameters to match your data and file location accordingly.

 

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 MultiGraphMap as object

Dim MultiGraphMap As Object

 

'Create a multi-graph map and assign it to the variable "MultiGraphMap"

Set MultiGraphMap = Plot.CreateMultiGraphMap(BoundaryFileName:=mvApp.ModuleFolder + "\Samples\CO2010.gsb", _

    DataFileName:=mvApp.ModuleFolder + "\Samples\CO2010.dat", _

    PIDCol:=1, XCol:=8, YCol:=9)

 

End Sub

Used by: PlotDocument object