Share via


DataFields property

Returns an array of Field objects representing the fields of data the user wants to map. Read-only Variant.

Applies to

Objects: DataMap

Syntax

object.DataFields

Parameters

Part

Description

object

Required. An expression that returns a DataMap object.

Example

  Sub DisplayInfoAboutDataFields()
    Dim objApp As New MapPoint.Application
    Dim objDataSet As MapPoint.DataSet
    Dim objDataMap As MapPoint.DataMap
    Dim objFields(1 To 3) As Variant 'MapPoint.Field

    'Set up application and objects to use
    objApp.Visible = True
    objApp.UserControl = True
    Set objDataSet = objApp.ActiveMap.DataSets.GetDemographics()
    Set objFields(1) = objDataSet.Fields("Households (1990)")
    Set objFields(2) = objDataSet.Fields("Households (2000)")
    Set objFields(3) = objDataSet.Fields("Households (2010)")
    Set objDataMap = objDataSet.DisplayDataMap(geoDataMapTypeCategoricalColumn, _
      objFields, geoShowByRegion1, , geoRangeTypeContinuousLog)

    'Display the first data field name
    MsgBox objDataMap.DataFields(0).Name
    'Display the count of data fields
    MsgBox UBound(objDataMap.DataFields) + 1  'starts at 0, so need to add one for count
  End Sub

Note   This sample code is specific for use in MapPoint North America. It is for illustration purposes only.