Share via


ResetPreferredRoads method

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

Applies to

Objects:  DriverProfile

Syntax

object.ResetPreferredRoads

Parameters

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

Example

    Sub ChangeThenResetPreferredRoads()

  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 preferred road settings and then reset them   objRoute.DriverProfile.PreferredRoads(geoRoadInterstate) = 0.8   objRoute.DriverProfile.ResetPreferredRoads
  '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.