Community of VE/MapPoint Users and Developers
This is a discussion on return the waypoint arrival time within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello Everyone, I am working with a set of waypoints in VBA. I am collecting the waypoint order and am ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| return the waypoint arrival time I am working with a set of waypoints in VBA. I am collecting the waypoint order and am preparing to update my Access database. I have recorded the stop order and can recover the itineray line with this code: MsgBox (objmap.ActiveRoute.Waypoints.Item(stop).name & " -" & objmap.ActiveRoute.Waypoints.Item(stop).PreferredA rrival) but there does not seem to be a way to return the time for that waypoint. has anyone figured out how to get that data? PS (objmap.ActiveRoute.Directions.Item(stop).Preferre dArrival) returns 12:00 PM by default but does not return the calculated arrival time. Thanks for your help Randye CSG |
| |||
| Retrieving Time and Distance
Hello, This VBA code reads the directions created by mappoint and updates a table in ms access s= directions counter and stops = waypoint item I hope this will answer your question. Private Sub WAYPOINT_Click() On Error GoTo err_wp_CLICK Dim objMap As MapPoint.Map Set objMap = Forms!MAPPLAN.csgmAP.ActiveMap Dim objLoc As MapPoint.location Dim objpushPin As MapPoint.Pushpin Dim na As String Dim ti As Date Dim s As Integer Dim STOPS As Integer Dim last As Integer Dim mi As String STOPS = 1 last = objMap.ActiveRoute.directions.count s = 1 DoCmd.SetWarnings False DoCmd.OpenQuery "gpsclearroute" loopstops: na = objMap.ActiveRoute.Waypoints.Item(s).name ti = objMap.ActiveRoute.directions.Item(STOPS).StartTim e If objMap.ActiveRoute.directions.Item(STOPS).Distance = 0 Then mi = 0 Else mi = Format(CDbl(objMap.ActiveRoute.directions.Item(STO PS).Distance), "#.#") 'MsgBox (s & "--" & na & " -- Dir: " & STOPS & " -- Time: " & ti & " -- TURNS: " & di) If mi = "." Then Me!mi = 0 Else Me!mi = mi Me!wp = s Me!ti = ti Me!na = na Me!st = STOPS Me!di = di di = objMap.ActiveRoute.directions.Item(STOPS).instruct ion & " for " & Me!mi & " miles" Me!wa = objMap.ActiveRoute.Waypoints.Item(s).StopTime * 1440 Me!arr = (objMap.ActiveRoute.Waypoints.Item(s).PreferredArr ival) DoCmd.OpenQuery "gpsbuildroute" If STOPS >= last Then GoTo display STOPS = STOPS + 1 If na <> objMap.ActiveRoute.directions.Item(STOPS).WAYPOINT .name Then s = s + 1 If STOPS <= last Then GoTo loopstops display: DoCmd.OpenQuery "gpsrouteend" DoCmd.OpenQuery "makegpstemp" DoCmd.OpenQuery "gpsplotupdate" DoCmd.SetWarnings True Dim stDocName As String Dim stLinkCriteria As String stDocName = "poproute" 'stLinkCriteria = "[route]=" & "'" & Me![mname] & "'" DoCmd.OpenForm stDocName, , , stLinkCriteria err_wp_CLICK: End Sub CSG |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Driving time between each waypoint | Anonymous | MapPoint 2006/2009 Discussion | 1 | 05-10-2005 05:42 AM |
| Adjusting preferred arrival setting | Anonymous | MapPoint 2006/2009 Discussion | 14 | 03-03-2005 12:43 PM |
| Specifying stop time of new waypoint | stephenmillington | MapPoint 2006/2009 Discussion | 0 | 06-09-2004 09:08 AM |
| Return surrounding Zip Codes | johnweidauer | MapPoint 2006/2009 Discussion | 0 | 02-11-2004 04:58 PM |
| Planning a route after arrival times | Anonymous | MapPoint 2006/2009 Discussion | 0 | 02-24-2003 07:11 AM |
All Inclusive Ski Holidays
For the latest all inclusive ski holidays make sure you stop at Holiday Hypermarket. You can get great value ski holidays to a range of destinations.
Best Travel Agent
Book your Travel with the UK's best Travel Agent - as named at the Guardian Unlimited Travel awards.
Holidays Cuba
When you book holidays in Cuba you will find a fascinating country with a heady combination of Spanish, African and Caribbean influences. Check our great deals.
Maldives Holidays
If you are looking for a serene, laid back break in the sunshine, Maldives holidays are the choice for you. Be enchanted by the Maldives!
Cheap Portugal Holidays
Want to know what the best time to book cheap Portugal holidays is? Well have a look on ulookubook.com for some useful information to save your cash. Golf, tennis and cycling are all very popular here.
Price Comparison
Price comparison is the name of the game at Travel.co.uk. Visit our website and see for yourself.
Cheap Holidays in Fuerteventura
Save your money! Live like royalty! Visit the Canary Islands! Get info on cheap holidays in Fuerteventura, only at On The Beach.