Share via


StopTime property

Returns or sets the amount of time to stay at a stop on the route; similar to selecting a stop in the route list and clicking Schedule Stop. Elapsed time must be less than 24 hours, in fractional days; for example, 3 hours equals 3/24 (or .125) of a day. Returns 0 if not used. Read/write Double.

Applies to

Objects:  Waypoint

Syntax

object.StopTime

Parameters

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

Remarks

GeoTimeConstants (geoOneDay, geoOneHour, and geoOneMinute) can also be used to set this property. (Note that geoOneDay is outside the range, however "geoOneDay–geoOneMinute" is valid.)

To schedule a stop for a certain number of nights, use the Overnights property of the Waypoint object.

If the StopTime and Overnights properties are both set, the property that was set most recently is used.

To return or set the time to stop driving each day, use the EndTime property of the DriverProfile object.

The StopTime property is reset to 0 if the Type property of the Waypoint object is changed to geoWaypointEnd.

Example

    Sub StopForThreeHours()

  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   With objRoute.Waypoints     .Add objMap.FindResults("Seattle, WA").Item(1)     .Add objMap.FindResults("Tacoma, WA").Item(1)     .Add objMap.FindResults("Redmond, WA").Item(1)   End With   objRoute.Calculate
  'Stop at second waypoint for 3 hours   objRoute.Waypoints.Item(2).StopTime = 3 * geoOneHour
  End Sub

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