Share via


TankWarnLevel property

Returns or sets the amount of fuel in the tank when a refuel warning is added to the driving directions, as a proportion of fuel tank capacity. Range 0–1, from empty to full. Not used if the IncludeRefuelWarnings property of a DriverProfile object is False. Read/write Double.

Applies to

Objects:  DriverProfile

Syntax

object.TankWarnLevel

Parameters

Part Description
object Required. An expression that returns a DriverProfile object.

Remarks

To return or set the fuel tank capacity, use the FuelTankCapacity property of the DriverProfile object.

Example

    Sub WarnWhenTankIsAlmostEmpty()

  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   objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)   objRoute.Waypoints.Add objMap.FindResults("Spokane, WA").Item(1)
  'Include fuel warnings, warn when tank is only a quarter full, and calculate the route   objRoute.DriverProfile.IncludeRefuelWarnings = True   objRoute.DriverProfile.TankWarnLevel = 0.25   objRoute.Calculate
  End Sub

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