Top |
Post New Question |
Read All |
MP2K Asks Microsoft
596
CDawson
-
February 4, 2002
I have been using MapPoint to sequence route stops using the Optimize Stops tool. Once I do this, is there a way to have MapPoint pull linked data into an Excel spreadsheet in the order in which the stops have been optimized?
Answer:
I am assuming that you want to put route information into a spreadsheet in the order of optimized stops. The answer is that this can certainly be done using code. Once a route is optimized, the order of the Waypoints in the Directions collection is set based on the optimization. All you need to do is go through the Directions or the Waypoints collections (depending on how much and what information you want to get) and then use Excel automation or ADO data access to write data to Excel.
See MapPoint programming Help for details on the properties of the Route, Direction and Waypoint objects to see what data is available and where. For example, you only get DrivingTime as a property of a Route object, StopTime is only a property of Waypoints and StartTime is only available from a Direction object.
- Walt Cygan
Post New Answer / Follow-up