MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Driver profile in Visual Basic

This is a discussion on Driver profile in Visual Basic within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I'm developing a software project using the MapPoint Control, but I have a little problem. I can't include rests ...


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-01-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Driver profile in Visual Basic

Hi,

I'm developing a software project using the MapPoint Control, but I have a little problem. I can't include rests in the Directions pane when calculating a route. I'm using this code:

Dim oApp As MapPoint.Application
Set oApp = GetObject(, "MapPoint.Application")
Dim oDrvProf As MapPoint.DriverProfile
Set oDrvProf = oApp.ActiveMap.ActiveRoute.DriverProfile

oDrvProf.StartTime = "7:00 AM"
oDrvProf.EndTime = "8:00 PM"

oDrvProf.IncludeRestStops = True
oDrvProf.TimeBetweenRests = 4 * geoOneHour
oDrvProf.RestStopDuration = 45 * geoOneMinute

oDrvProf.DrivingCostUnits = geoCostBasedOnDistance
oDrvProf.DrivingCost = "1"

Set oRte = oMap.ActiveRoute
oRte.Clear
With oRte.Waypoints
.Add oMap.FindPlaceResults("Burgos")(1)
.Add oMap.FindPlaceResults("Santiago de Compostela")(1)
.Optimize
End With
oRte.Calculate
'zoom.
oRte.Directions.Location.GoTo

Can you tell me where the problem is? I think I'm using it in the right way, but I'm not sure.

Thanks a lot.
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-01-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Hi again,

I'm answering me. The problem is that I didn't use the DriverProfile object from the Mappoint.route object, so it didn't work.

Now it works fine!!!
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
basic, driver, profile, visual


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
Visual Basic 6.0 Anonymous MapPoint 2006/2009 Discussion 1 08-06-2004 06:17 AM
Visual Basic 6.0 fantef MapPoint 2006/2009 Discussion 0 04-15-2004 11:41 AM
mappoint, visual c++ vs visual basic Anonymous MapPoint 2006/2009 Discussion 6 03-30-2004 09:17 PM
Driver profile in Visual Basic Anonymous MapPoint 2006/2009 Discussion 0 08-29-2003 03:27 AM
Visual basic or visual c++ in mappoint misterb83 MapPoint 2006/2009 Discussion 1 02-14-2003 08:31 AM


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

Cheap Flights to Brussels
Book cheap flights to Brussels online today. Brussels is a city with diverse culture with over 100 museums to visit and an array of different architectural designs to view.

Business Travel Agent
Leading Business Travel Agent. Personal service is at the heart of our business. Talk to one of our travel agents today.

Holidays in Italy
Holidays in Italy boast some stunning countryside as well as a beautiful coastline. You can even visit an active volcano like Stromboli or Etna. Book at dealchecker.co.uk.

St Lucia Holidays
St Lucia holidays offer something for everyone. Enjoyed by families and young couples alike, St Lucia is a great destination. See online!

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.

Cheap Travel
Travel.co.uk has some excellent offers on cheap travel. Click here.

Cheap holidays in Cyprus
Stunning coastline! Beautiful beaches! Cheap holidays in Cyprus, available 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 52