CreateFlowMap

 

The CreateFlowMap method creates a flow map. Flow map properties are edited through the returned FlowMap object.

 

Syntax

object.CreateFlowMap( BoundaryFileName, DataFileName, DataTableName, BoundaryFileOptions, FlowMethod, PIDCol, EPIDCol, VarCol )

 

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

FlowMethod

MVFlowMethod

optional; overlay curves or connect centroids

PIDCol

Integer

optional; primary ID or start primary ID column (depends on FlowMethod), column A equals 1

EPIDCol

Integer

optional; end primary ID column (with mvFlowConnectEnds), column A equals 1

VarCol

Integer

optional; variable column, column A equals 1

 

Example

This example creates a flow map that connects the boundary centroids with flow lines.

 

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

Dim FlowMap As Object

 

'Create a flow map using the connect centroids method

Set FlowMap = Plot.CreateFlowMap(BoundaryFileName:= mvapp.ApplicationFolder + "\Samples\us50ll.gsb", DataFileName:= mvapp.ApplicationFolder + _

"\ Samples\flow.dat", FlowMethod:= mvFlowConnectEnds, PIDCol:=1, _

EPIDCol:=2, VarCol:=3 )

 

End Sub

 

Used by: PlotDocument object