MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Letting MapPoint choose the waypoint sequence

This is a discussion on Letting MapPoint choose the waypoint sequence within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I can add wappoints to a MapPoint.Route object, then call Calculate() to figure the best directions to go. But ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-21-2005
Senior Member
Green Belt
 
Join Date: Jul 2005
Posts: 105
Letting MapPoint choose the waypoint sequence

Hi,

I can add wappoints to a MapPoint.Route object, then call Calculate() to figure the best directions to go. But now I need it to feed back to me the most efficient stop sequence, minimizing the travel time. The problem I have is that MapPoint uses the waypoints in the order I added them, and as fart as I know is not re-organizing them according to the preferred order.

Would I still use Calculate()? If not, what other functions would I use instead? Or am I just not looking in the correct place?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 10-21-2005
calv1ns's Avatar
Member
Green Belt
 
Join Date: Mar 2005
Posts: 91
Beantown Bob

Code:
  Sub OptimizeRoute()

  Dim objApp As New MapPoint.Application
  Dim objMap As MapPoint.Map
  Dim objRoute As MapPoint.Route

  'Set up the application
  Set objMap = objApp.ActiveMap
  Set objRoute = objMap.ActiveRoute
  objApp.Visible = True
  objApp.UserControl = True

  'Add route stops and calculate route
  With objRoute.Waypoints
    .Add objMap.FindResults("Seattle, WA").Item(1)
    .Add objMap.FindResults("Redmond, WA").Item(1)
    .Add objMap.FindResults("Tacoma, WA").Item(1)
    .Add objMap.FindResults("Bellevue, WA").Item(1)
  End With
  objRoute.Calculate

  'Optimize the route
  objRoute.Waypoints.Optimize  '<--- Optimize!

  End Sub
So how are the Bruins doing?

Ciao,
__________________
Calv1ns
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 10-21-2005
Senior Member
Green Belt
 
Join Date: Jul 2005
Posts: 105
How are the Bruins doing? Hopefully better than the Red Sox and the Patriots.

But "Optimize" sounds like a very good thing to do. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
choose, letting, mappoint, sequence, waypoint


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to choose Fast, Short or Preferred itineray Anonymous MapPoint 2006/2009 Discussion 1 11-10-2004 04:14 AM
Export to Excel - Sort Sequence Anonymous MapPoint 2006/2009 Discussion 0 01-08-2004 07:02 AM
sequence of imported data changes Harv MapPoint 2006/2009 Discussion 1 05-27-2003 05:09 PM
Extracting the route sequence ivtch MapPoint 2006/2009 Discussion 2 03-11-2003 04:29 PM
I have been using MapPoint to sequence route stops.... Anonymous MapPoint 2006/2009 Discussion 1 02-04-2002 11:31 AM


All times are GMT -5. The time now is 10:23 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55