Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

I am currently running Mappoint 2001 and will buy ....

This is a discussion on I am currently running Mappoint 2001 and will buy .... within the MapPoint Desktop 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 ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    I am currently running Mappoint 2001 and will buy 2002 if it can do the following:
    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

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. C#: How to find out if MapPoint is still running?
    By MD2000 in forum MapPoint Desktop Discussion
    Replies: 12
    Last Post: 01-14-2007, 03:34 AM
  2. Help!! Error running mappoint
    By gag in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-27-2004, 10:45 PM
  3. I currently have Mappoint 2000 running on my PC. (....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-11-2002, 12:44 PM
  4. I am currently running the MapPoint 2002 Trial. I....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-04-2001, 08:45 AM
  5. I am currently running the MapPoint Trial. (I alre....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 08-27-2001, 08:13 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25