MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Optimize and calculate a Route

This is a discussion on Optimize and calculate a Route within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, I have an ACCESS-table with maybe 30 addresses and would like to optimize and calculate a route with VB. ...


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 08-01-2003
Junior Member
White Belt
 
Join Date: Jun 2003
Posts: 9
Optimize and calculate a Route

Hello,
I have an ACCESS-table with maybe 30 addresses and would like to optimize and calculate a route with VB. Has anyone an idea?
Thanks
Ralf
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 08-13-2003
Junior Member
White Belt
 
Join Date: Jun 2003
Posts: 9
I found it by myself:


Private Sub Befehl0_Click()
Dim objApp As MapPoint.Application
Dim objMap As MapPoint.MAP
Dim objRoute As MapPoint.Route
Dim db As Database, rs As Recordset, i As Integer, Status As String
Set db = CurrentDb
Set rs = db.OpenRecordset("KundenXLS")
'Anwendung einrichten
Set objApp = CreateObject("mappoint.application")
Set objMap = objApp.ActiveMap
Set objRoute = objMap.ActiveRoute
objApp.Visible = True
objApp.UserControl = True
'Route erstellen und optimieren
With objRoute.Waypoints
do until rs.eof
.Add objMap.FindAddressResults(rs!Straße, rs!Ort, , , rs!Plz, geoCountryGermany).Item(1)
rs.MoveNext
Loop
End With
objRoute.Waypoints.Optimize
MsgBox "Die Route wurde optimiert"
objRoute.Calculate
End Sub


It works fine but is there also a way to get back to ACCESS the distances from every point to the next?
Thanks to everyone

Ralf
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 08-22-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
There is an itenary collection that gives you more information on each segment including time and distance.
Back to the route optimize method, do you know of a similar method in mappoint 2003 (web service ) ???
Regards,
Rasmeek
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
calculate, optimize, route


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
Handling Route that Calculates but does not Optimize Eric Frost MapPoint 2006/2009 Discussion 4 03-07-2005 03:07 PM
How do I calculate a route distance without displaying route spideybud MapPoint 2006/2009 Discussion 4 09-09-2003 11:14 AM
Optimize a Route with Scheduled Time windows Anonymous MapPoint 2006/2009 Discussion 0 07-09-2003 07:20 AM
Calculate route with Segment preferences vs optimize David Kachuck MapPoint 2006/2009 Discussion 1 01-03-2003 04:29 PM
Route optimize: shortest vs quickest David Kachuck MapPoint 2006/2009 Discussion 1 12-16-2002 08:23 PM


All times are GMT -5. The time now is 08:07 PM.


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