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.
|
Remarks
To display data as a DataMap object, use the DisplayDataMap method on a DataSet object.
To display a DataSet object as a Pushpin map, use the DisplayPushpinMap method on a DataSet object.
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 (1980)")
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 specific for use in MapPoint North America; it is for illustration purposes only.