CreatePieMap

 

The CreatePieMap method creates a pie map. Pie map properties are edited through the returned PieMap object.

 

Syntax

Object.CreatePieMap( pVarCols, BoundaryFileName, DataFileName, DataTableName, BoundaryFileOptions, PIDCol )

 

Parameter

Type

Description

pVarCols

Array of Longs

required; array of data columns

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; 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 CreatePieMap2.

 

Example

This example creates a pie map of Colorado.

 

Sub main

 

'Creates an instance of the MapViewer Application object

'and assigns it to the variable named "mvApp"

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes the application main window visible

 mvApp.Visible = True

 

'Assigns the location of the samples folder to the variable "InPath"

 InPath$ = mvApp.ApplicationFolder + " samples\"

 

'Creates a map document object, and assigns it to the variable named "Plot"

 Set Plot = mvApp.Documents.Add(DocType:=mvDocPlot)

 

'Defines the variables for a pie map

 Dim Variables(1 To 3) As Long

 Variables(1) = 4

 Variables(2) = 8

 Variables(3) = 6

 

'Creates a pie map object and assigns it to the variable named "PieMap"

 Set PieMap = Plot.CreatePieMap( Variables, BoundaryFileName:=InPath$ + _

 "co2010.gsb", DataFileName:=InPath$ + "co2010.dat", BoundaryFileOptions:= _

 "SecondaryIDField=2, Attribute1Field=1", PIDCol:=1 )

 

End Sub

 

Used by: PlotDocument object