Community of VE/MapPoint Users and Developers
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. ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
|
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 |
| |||
|
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 |
![]() |
| Tags |
| calculate, optimize, route |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |