Share via


FuelConsumptionUnits property

Returns or sets the unit of measurement for fuel consumption. Read/write GeoFuelConsumptionUnits.

GeoFuelConsumptionUnits

Value

Description

geoLitersPer10Kilometers

2

Liters per 10 kilometers

geoLitersPer100Kilometers

1

Liters per 100 kilometers

geoMilesPerGallonUK

4

Miles per U.K. gallon

geoMilesPerGallonUS

3

Miles per U.S. gallon

Applies to

Objects: DriverProfile

Syntax

object.FuelConsumptionUnits

Parameters

Part

Description

object

Required. An expression that returns a DriverProfile object.

Remarks

Example

  Sub SetFuelConsumptionUnits()

  Dim objApp As New MapPoint.Application
  Dim objMap As MapPoint.Map
  Dim objRoute As MapPoint.Route

  'Set up the application
  Set objMap = objApp.ActiveMap
  Set objRoute = objMap.ActiveRoute
  objApp.Visible = True
  objApp.UserControl = True

  'Add route stops and calculate the route
  objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)
  objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)

  'Set fuel consumption units to liters per 10 kilometers
  objRoute.DriverProfile.FuelConsumptionUnits = geoLitersPer10Kilometers

  End Sub

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