Example: Using MPRouteWriter to Export a Route

Top  Previous  Next

This example shows you how to use MPRouteWriter to create an and export an ordered route for a sales representative visiting a group of clients. The example is based on the clients sample data that Microsoft ship with Microsoft MapPoint. It has been converted to Microsoft Excel, and some additional data (sales quantities and notes) have been added. The names have been changed to be contact names, and some fictitious company names have been added. This spreadsheet is called clients.xls and can be found in the MPRouteWriter_samples.zip file available from http://www.MPRouteWriter.com/downloads/download.shtml.

 

This data is imported into MapPoint using the Data Import Wizard. The results are included in the clients_map.ptm file in the samples download. This contains two pushpin sets: Office Locations, and Clients, and looks like this:

 

example_clients_map

 

Next we create a route for a sales representative for the clients in California, Arizona, and Utah. You can add pins individually, or you can add them to the route as a group. The sales representative starts and finishes at the Head Office, so this is added as both the start and end waypoint. The resulting route is included in the clients_route.ptm map file, and looks like this:

 

example_clients_route

 

Notice that with the exception of the Head Office, all of the waypoints are in an essentially random order.

 

Next, display the main MPRouteWriter panel by selecting MPRouteWriter on MapPoint's Tools menu. The panel looks like this:

 

example_mainscreen

 

We want to optimize the route, so check the Optimize Route Order checkbox. We are interested in mileages but not travel times, so check the Output Distances checkbox and clear the Output Times checkbox. Also clear the Overwrite all stop times and Output Rest Stops check boxes. We would like to see the client-specific information, so set the Cross-reference with pushpins. However we are not interested in the client coordinates, so clear Output Pushpin Coordinates. Also clear Output Pushpin Street Address because the client pushpin data fields already include this information. The Resolve duplicate matching pushpins checkbox is cleared to allow for quicker processing. Set the Output Route to setting to Excel Spreadsheet. Press Save Route to start processing. This may take a few minutes due to the use of the optimize option. The resulting Excel spreadsheet will look like this:

 

example_output

 

Further details on specific aspects of MPRouteWriter operation can be found on the Running MPRouteWriter pages.