Instruction property
Returns the text of the specified direction. Read-only String.
Applies to
Objects: Direction
Syntax
object.Instruction
Parameters
Part | Description |
---|---|
object | Required. An expression that returns a Direction object. |
Remarks
The Instruction property is the default property of the Direction object.
Example
Sub Get2ndDirectionInstruction()
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
'Output the text of the second direction
MsgBox "The second direction is: " _
+ objRoute.Directions.Item(2).Instruction
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.