IsCalculated property
Returns whether the route is calculated. True if route is calculated for the current configuration of waypoints. Adding, deleting, or reordering waypoints sets this value to False. Read-only Boolean.
Applies to
Objects: Route
Syntax
object.IsCalculated
Parameters
Part |
Description |
---|---|
object |
Required. An expression that returns a Route object. |
Example
Sub CalculateRouteIfItIsNot()
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)
If Not (objRoute.IsCalculated) Then objRoute.Calculate
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.