Share via


ResetSpeeds method

Resets the preferences in the Speed property of the DriverProfile object to the MapPoint default values.

Applies to

Objects: DriverProfile

Syntax

object.ResetSpeeds

Parameters

Part

Description

object

Required. An expression that returns a DriverProfile object.

Example

Sub ChangeThenResetSpeeds()

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)
objRoute.Calculate

'Change Street speed and then reset it
objRoute.DriverProfile.Speed(geoRoadStreet) = 30
objRoute.DriverProfile.ResetSpeeds

'Recalculate the route
objRoute.Calculate

End Sub

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