Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Start time of next waypoint does not take into account, the stop time at previous waypoint

This is a discussion on Start time of next waypoint does not take into account, the stop time at previous waypoint within the Development forums, part of the MapPoint Desktop Discussion category; Hi Guys, I am integrating Mappoint with Excel VBA. I am adding some 10 Waypoints and each waypoint has a ...

  1. #1
    kulksnikhil is offline Junior Member White Belt
    Join Date
    Jul 2009
    Posts
    6

    Red face Start time of next waypoint does not take into account, the stop time at previous waypoint

    Hi Guys,

    I am integrating Mappoint with Excel VBA.

    I am adding some 10 Waypoints and each waypoint has a specific stoptime. I have set the driverprofile.startime as 09:00:00 AM... after Route.Calculate, when I obtained the "Starttimes" at each waypoint, none of the Waypoint's starttime included the stop time at the previous stops.

    Following table is what I am getting, If you see, start time for Loc3 is less than Dept_time of Loc2.

    Loc - start_time -Dept_time
    Loc1 - 08:05:29-08:06:16
    Loc2-08:06:16-08:07:03
    Loc3-08:06:16-08:18:25
    Loc4-08:07:03-08:07:50
    Loc5-08:07:03-08:07:50
    Loc6-08:07:50-08:08:37
    Loc7-08:08:06-08:08:53
    Loc8-08:08:07-08:18:50
    Loc9-08:08:21-08:09:08
    Loc10-08:08:55-08:09:42
    Loc11-08:16:48-08:17:35
    Loc12-08:16:48-08:17:35


    My code to display this is as below,

    For Each mStop In mRoute.Waypoints
    ActiveCell.Value = mStop.Name
    ActiveCell.Offset(0, 1).Value = mRoute.Directions.Item(mStop.ListPosition).StartTi me
    ActiveCell.Offset(0, 2).Value = mRoute.Directions.Item(mStop.ListPosition).StartTi me + mStop.StopTime
    'ActiveCell.Offset(0, 1).Value = mStop.Location.StreetAddress.PostalCode
    ActiveCell.Offset(1, 0).Select
    Next


    How should I instruct Mappoint to consider stop times as well, while calculating the start times?

    Please please please help.

    kind regards,
    Last edited by kulksnikhil; 08-24-2009 at 09:52 PM. Reason: spelling mistake

  2. #2
    kulksnikhil is offline Junior Member White Belt
    Join Date
    Jul 2009
    Posts
    6

    Unhappy Re: Start time of next waypoint does not take into account, the stop time at previous waypoint

    Hi Guys !!!

    Can somebody please through some light on this issue???? Would be of great help... !!!

    I am completely clueless about this. Please let me know.. if any other information regarding my coding is required for you to help me out.

    thanks in advance !!!
    Last edited by kulksnikhil; 08-24-2009 at 09:48 PM. Reason: sentense restructuring

  3. #3
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Start time of next waypoint does not take into account, the stop time at previous waypoint

    I am guessing Loc2 and Loc3 are at the same location.

    Can you post your sample data and/or also the ptm file? Zip the files first and then attach to your post.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  4. #4
    kulksnikhil is offline Junior Member White Belt
    Join Date
    Jul 2009
    Posts
    6

    Angry Re: Start time of next waypoint does not take into account, the stop time at previous waypoint

    Hi Eric,

    Thanks for your reply.

    Well, the two points are not at same location.. they are at different locations. more over, I have simply added these locations in sequence and I have NOT used mroute.optimize to let Mappoint rearrange waypoints on its own. So essentially, the even if the two locations are at same place, at least the start time of Loc3 should be same as departure time at Loc2.

    Please find attached a zip file, which consists of
    1. An excel(2007) worksheet with data and a button
    2. UnitedKingdom.ptm file.

    Actually the .ptm file's 'Time' column displays the correct times. However, when i try to retireve this information using mroute.directions.item(X).starttime , I don't get the time that is displayed in Route map window.
    Attached Files Attached Files

  5. #5
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Start time of next waypoint does not take into account, the stop time at previous waypoint

    I don't have Excel 2007 on this machine. Do you mind to save it down to Excel 2003 format?

    I've messed with this before and I know it took me some time to figure it out, but eventually it did all make sense

    Eric
    Last edited by Eric Frost; 08-25-2009 at 03:20 PM.
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  6. #6
    kulksnikhil is offline Junior Member White Belt
    Join Date
    Jul 2009
    Posts
    6

    Re: Start time of next waypoint does not take into account, the stop time at previous waypoint

    Hey Eric .. I think I found the solution while I was making the excel file for you ...I am getting correct values now...... thanks though for your help !!!

    I was looping through the "Waypoints" collection, instead of the "Directions" collection !!!
    I am getting proper Arrive and depart times now !!!

    thanks again !!!!
    Last edited by kulksnikhil; 08-25-2009 at 07:01 PM. Reason: sentense restructuring !!!

  7. #7
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Start time of next waypoint does not take into account, the stop time at previous waypoint

    Ah! very cool. I should have spotted that for you. Good work!

    There could be a guide with some better examples. Maybe at article for MP2K Magazine ( www.mp2kmag.com ). Do you want to write up something simple?

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  8. #8
    kulksnikhil is offline Junior Member White Belt
    Join Date
    Jul 2009
    Posts
    6

    Re: Start time of next waypoint does not take into account, the stop time at previous waypoint

    hmm... are you asking, If I want to write some article in the Mp2kmag.com website?

  9. #9
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: Start time of next waypoint does not take into account, the stop time at previous waypoint

    Yeah maybe just some brief write-up on how to access the "times" for the Route object, since they are sort of buried and it's hard for people to get started.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  10. #10
    kulksnikhil is offline Junior Member White Belt
    Join Date
    Jul 2009
    Posts
    6

    Re: Start time of next waypoint does not take into account, the stop time at previous waypoint

    hmm....at the moment, I am rushing to meet a deadline ... my deadline is 20-sep. Once I am through with this .. I would add my experience into the mag. Thanks for this !!!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Calculate Route stop times from last Waypoint back
    By noonan59 in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-03-2009, 02:03 PM
  2. Time till next Stop
    By Mani in forum Development
    Replies: 0
    Last Post: 04-02-2009, 08:51 AM
  3. Driving time between each waypoint
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-10-2005, 06:42 AM
  4. return the waypoint arrival time
    By CSG in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 06-24-2004, 07:34 AM
  5. Specifying stop time of new waypoint
    By stephenmillington in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-09-2004, 10:08 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127