MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Has anyone had any problems setting the value of t....

This is a discussion on Has anyone had any problems setting the value of t.... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Has anyone had any problems setting the value of the PreferredDeparture property in the Waypoint object? I was having problems ...


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 12-12-2001
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Has anyone had any problems setting the value of the PreferredDeparture property in the Waypoint object? I was having problems with this a while ago, but the situation was more complicated because I was using Borland's C++ Builder. I have now re-written my code using the standard IDispatch interface, but changes to PreferredDeparture are just ignored. Unfortunately, I don't have access to a copy of VB so I'm still using C++. My code does work with MapPoint 2001 but not 2002. Has anyone tried setting PreferredDeparture in a VB application?
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 12-12-2001
Senior Member
Green Belt
 
Join Date: Aug 2002
Posts: 124
I tried the following code in a VB app with the MapPoint ActiveX control called "ctlMapPoint" and a Command button called "cmdTest":


Private Sub cmdTest_Click()

On Error GoTo ErrSub

Dim objMap As MapPointCtl.Map

Dim objRoute As MapPointCtl.Route

'Set up the application

Set objMap = ctlMapPoint.ActiveMap

Set objRoute = objMap.ActiveRoute

'Add two waypoints to the map

objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)

objRoute.Waypoints.Add objMap.FindResults("Spokane, WA").Item(1)

'Set the time you'd like depart from the start point

objRoute.Waypoints.Item(1).PreferredDeparture = TimeValue("8:00:00 AM")

objRoute.Calculate

ExitSub:

Set objRoute = Nothing

Set objMap = Nothing

Exit Sub

ErrSub:

Resume ExitSub

End Sub


This worked perfectly.


- Walt Cygan
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 10-26-2006
Junior Member
White Belt
 
Join Date: Jul 2006
Posts: 8
Re: Has anyone had any problems setting the value of t....

You must first add two waypoints before you can set preferred departure.
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
problems, setting


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
Re-setting Size of Map saved cableghost MapPoint 2006/2009 Discussion 1 02-06-2006 12:27 PM
Display setting for Map alwasl8 MapPoint 2006/2009 Discussion 1 10-07-2005 10:37 PM
Setting Dataset at runtime? shadbell MapPoint 2006/2009 Discussion 1 12-17-2003 10:25 AM
setting addresses in canada, Anonymous MapPoint 2006/2009 Discussion 0 10-22-2003 08:27 PM
Setting Speeds aarunprakash MapPoint 2006/2009 Discussion 0 06-06-2003 01:45 PM


All times are GMT -5. The time now is 08:46 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