Community of VE/MapPoint Users and Developers
This is a discussion on I am currently running Mappoint 2001 and will buy .... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am currently running Mappoint 2001 and will buy 2002 if it can do the following: I want to plot ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| I want to plot routes for each of my 300 employees to five different work locations and export ONLY the distances for each to an excel spreadsheet. Can I do this in Mappoint 2002? Joshua |
| |||
|
This can be done quite easily. The code needed to extract distances is actually in the MapPoint 2002 Programming Reference, under the Distance Property section. Here is the code:<form><textarea wrap="off" readonly="true" name="code" style="BORDER-BOTTOM: gray 1px inset; BORDER-LEFT: gray 1px inset; BORDER-RIGHT: gray 1px inset; BORDER-TOP: gray 1px inset; OVERFLOW: auto; WIDTH: 100%" rows="25" cols="40">Sub TotalRouteDistance() Dim objApp As New MapPoint.Application Dim objMap As MapPoint.Map Dim objRoute As MapPoint.Route 'Set up 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 total length of the route MsgBox "The route distance is: " + CStr(objRoute.Distance) End Sub </textarea> </form> You can find the Programming Reference on http://msdn.microsoft.com/mappoint or in MapPoint 2002's Help. This code then needs to be extended to save all calculated distances in an Excel workbook. Again, this is a simple programming task. |
![]() |
| Tags |
| 2001, buy, mappoint, running |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C#: How to find out if MapPoint is still running? | MD2000 | MapPoint 2006/2009 Discussion | 12 | 01-14-2007 04:34 AM |
| Help!! Error running mappoint | gag | MapPoint 2006/2009 Discussion | 1 | 01-27-2004 11:45 PM |
| I currently have Mappoint 2000 running on my PC. (.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 07-11-2002 01:44 PM |
| I am currently running the MapPoint 2002 Trial. I.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 09-04-2001 09:45 AM |
| I am currently running the MapPoint Trial. (I alre.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 08-27-2001 09:13 AM |