I have created a route of 20 stops - each stop is a customer with its account number. How can I extract the route sequence that MapPoint creates (which customer is what stop number)?
Thanks. Ivan
This is a discussion on Extracting the route sequence within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have created a route of 20 stops - each stop is a customer with its account number. How can ...
I have created a route of 20 stops - each stop is a customer with its account number. How can I extract the route sequence that MapPoint creates (which customer is what stop number)?
Thanks. Ivan
Use the Waypoints collection. The help file has a pretty good example that should get you started.
John
http://www.support-pc.com
Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
The following code snippet show how you can iterate through the directions list.
Private Sub OKButton_Click()
Dim g_oApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objRoute As MapPoint.Route
'Set up the application
Set objMap = g_oApp.ActiveMap
Set objRoute = objMap.ActiveRoute
'objApp.Visible = True
'objApp.UserControl = True
'Add route stops
With objRoute.Waypoints
.Add objMap.FindResults("Tacoma, WA").Item(1)
.Add objMap.FindAddressResults("16955 SE 38th Street", "Vancouver", "WA").Item(1)
End With
' Iterate through the Direction List
Dim inx As Integer
For inx = 1 To objRoute.Directions.Count
MsgBox (objRoute.Directions.Item(inx).Instruction)
Next inx
objMap.Location.Highlight = True
g_oApp.ItineraryVisible = False
g_oApp.PaneState = geoPaneNone
End Sub
Sitting still and wishing makes no person great..
The good lord and sent you fishing but you should dig the bait!!
There are currently 1 users browsing this thread. (0 members and 1 guests)