MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




return the waypoint arrival time

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 ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2004
CSG CSG is offline
Junior Member
White Belt
 
Join Date: Mar 2004
Posts: 9
return the waypoint arrival time

Hello Everyone,

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
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 04-19-2004
CSG CSG is offline
Junior Member
White Belt
 
Join Date: Mar 2004
Posts: 9
error in post

this line returns the first driving direction for the waypoint.

MsgBox (objmap.ActiveRoute.Directions.Item(stop).instruct ions)


Randye
CSG
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 04-19-2004
CSG CSG is offline
Junior Member
White Belt
 
Join Date: Mar 2004
Posts: 9
starttime for a waypoint

Found it

MsgBox (objmap.ActiveRoute.Waypoints.Item(stop).name & " -" & objmap.ActiveRoute.Directions.Item(stop).StartTime )


Randye
CSG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 06-23-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
This is great, but exactly what is "stop"?

I am having a tough time identifying the direction instruction that correalates to the waypoint.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 06-24-2004
CSG CSG is offline
Junior Member
White Belt
 
Join Date: Mar 2004
Posts: 9
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
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


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
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 times are GMT -5. The time now is 11:34 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

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.


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