Action property

Returns the action for the specified direction. Read-only GeoDirectionAction.

GeoDirectionAction Value Description
geoActionArrive
2
Arrive at a stop or end point
geoActionBearLeft
5
Bear left
geoActionBearRight
6
Bear right
geoActionContinue
8
Continue traveling in the same direction as the previous instruction
geoActionCrossBorder
9
Cross a border
geoActionDepart
1
Depart from a stop or start point
geoActionEnterRoundabout
11
Enter a roundabout
geoActionExitRoundabout
12
Exit a roundabout
geoActionMerge
7
Merge onto a highway or motorway, or limited-access road
geoActionOther
0
Other actions
geoActionContinue
8
Continue traveling in the same direction as the previous instruction
geoActionTurnBack
10
Turn back to travel in the opposite direction as the previous instruction
geoActionTurnLeft
3
Turn left
geoActionTurnRight
4
Turn right

Applies to

Objects:  Direction

Syntax

object.Action

Parameters

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

Example

    Sub GetDirectionAction()

  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 waypoints and calculate the route   objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)   objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)
  objRoute.Calculate
  'Get the action for the first direction   MsgBox "The first direction is action type: " + _     CStr(objRoute.Directions.Item(1).Action)
  End Sub

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