TankStartLevel property
Returns or sets the amount of fuel in the tank at the start of the route, as a proportion of fuel tank capacity. Range 0–1, from empty to full. Not used if the IncludeRefuelWarnings property of the DriverProfile object is False. Read/write Double.
Applies to
Objects: DriverProfile
Syntax
object.TankStartLevel
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 StartWithAlmostEmptyTank()
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, set tank start level to almost empty, and calculate the route
objRoute.DriverProfile.IncludeRefuelWarnings = True
objRoute.DriverProfile.TankStartLevel = 0.05
objRoute.Calculate
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.