TimeBetweenRests property

Returns or sets the interval for rest stops, in fractional days rounded to the nearest even minute. Must be less than 24 hours. Read/write Double.

Applies to

Objects:  DriverProfile




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


You can use the GeoTimeConstants constants when setting the TimeBetweenRests property. For example, an interval of 4 hours can be set as "4 * geoOneHour".

Rest stops are added to the route based on IncludeRestStops and RestStopDuration properties of the DriverProfile object.


    Sub RestEveryHour()

  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)
  'Rest every hour and calculate the route   objRoute.DriverProfile.IncludeRestStops = True   objRoute.DriverProfile.TimeBetweenRests = 1 * geoOneHour   objRoute.Calculate
  End Sub

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