Share via


ShowDataMappingWizard method

Opens the Data Mapping Wizard; similar to clicking Data Mapping Wizard on the Data menu. Returns a DataMap object if one is created. Returns Nothing if the user cancels out of the wizard.

Applies to

Collections: DataSets

Syntax

object.ShowDataMappingWizard([HWndParent], [DataSetToUse], [Startpage])

Parameters

Part

Description

object

Required. An expression that returns a DataSets collection.

HWndParent

Optional Long. Handle of the user's window, to set as the parent instead of the MapPoint window.

Note   Do not use a handle for a window other than the MapPoint window if the MapPoint window is visible.

DataSetToUse

Optional DataSet object. The data set to map.

Startpage

Optional GeoDataMappingPage. Page to which the Data Mapping Wizard opens. The Startpage parameter is used only if the DataSetToUse parameter is set. Default is geoMapTypePage.

GeoDataMappingPage Value Description
geoChartLegendPage 4 Legend page where the user can set chart size (for Unsized Pie Chart maps), color (for Series Column Chart maps), and legend labels. Valid as a start page only for an existing data map. Valid only for Unsized Pie Chart, Sized Pie Chart, Column Chart, and Series Column Chart maps.
geoDataFieldsPage 2 Data Fields page where the user can select the fields to display on the map and the display attributes. Valid as a start page only for an existing data map. Not valid for Pushpin maps.
geoDataSetPage 1 Data Set page where the user can choose to map demographic, imported, or linked data. Valid as a start page only for an existing data map. Valid for all map types.
geoLegendPage 3 Legend page where the user can set the labels for range types, value order, data ranges, and ranges, along with mapping colors and symbols. Valid as a start page only for an existing data map. Not valid for Unsized Pie Chart or Pushpin maps.
geoMapTypePage 0 Map Type page where the user can choose a map type. Valid for all map types. Default start page.
geoPushpinSetPage 5 Pushpins page where the user can select the properties for the Pushpin set. Valid as a start page only for an existing data map. Valid only for Pushpin maps.

Remarks

Example

Sub EditShadedAreaMapWithWizard()
Dim objApp As New MapPoint.Application
Dim objDataSet As MapPoint.DataSet
Dim objDataMap As MapPoint.DataMap
Dim objField As MapPoint.Field

'Set up the application and objects to use
objApp.Visible = True
objApp.UserControl = True
Set objDataSet = objApp.ActiveMap.DataSets.GetDemographics()
Set objField = objDataSet.Fields("Households (2010)")
Set objDataMap = _
objDataSet.DisplayDataMap(geoDataMapTypeShadedArea, _
objField, geoShowByRegion1, geoCombineByDefault, _
geoRangeTypeDiscreteEqualRanges, geoRangeOrderDefault, 15)
objDataMap.LegendTitle = "State Households"

'Use the MapPoint user interface to edit the ranges
objApp.ActiveMap.DataSets.ShowDataMappingWizard _
DataSetToUse:=objDataSet, StartPage:=geoLegendPage
End Sub

Note   This sample code is specifically for use in MapPoint North America; it is for illustration purposes only.