MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Importing a Route using Visual Basic in Access2000

This is a discussion on Importing a Route using Visual Basic in Access2000 within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'm trying to import a route into Mappoint from Access. I've figured out how to import the Pushpins using the ...


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 06-01-2004
Junior Member
White Belt
 
Join Date: Sep 2003
Posts: 1
Importing a Route using Visual Basic in Access2000

I'm trying to import a route into Mappoint from Access. I've figured out how to import the Pushpins using the Data Import Wizard but I don't see a wizard for importing a route using the pushpins. I'm pretty new to Visual Basic, but in reading the documentation that comes with Mappoint, I have been able to write code and create a route in Mappoint. Here is the code:

Sub WaypointTimes()
Dim oMap As MapPoint.Map
Set oMap = GetObject(, "MapPoint.Application").ActiveMap
oMap.Parent.PaneState = geoPaneRoutePlanner

With oMap.ActiveRoute.Waypoints
Dim oWP As MapPoint.Waypoint
.Add oMap.FindPushpin("STS921")
.Add oMap.FindPushpin("T3084")
.Add oMap.FindPushpin("T3448")
.Add oMap.FindPushpin("T3012")
.Add oMap.FindPushpin("T2099")
.Add oMap.FindPushpin("T2015")
.Add oMap.FindPushpin("T3458")
.Add oMap.FindPushpin("T1887")
.Add oMap.FindPushpin("T2956")
.Add oMap.FindPushpin("T1885")
.Add oMap.FindPushpin("T2840")
.Add oMap.FindPushpin("T4454")
.Add oMap.FindPushpin("T2608")
.Add oMap.FindPushpin("T4470")
.Add oMap.FindPushpin("T1911")
.Add oMap.FindPushpin("T3512")
.Add oMap.FindPushpin("STS921")

.Item(1).PreferredDeparture = "09:57 PM"
.Item(2).StopTime = 30 * geoOneMinute
.Item(3).StopTime = 15 * geoOneMinute
.Item(4).StopTime = 30 * geoOneMinute
.Item(5).StopTime = 30 * geoOneMinute
.Item(6).StopTime = 30 * geoOneMinute
.Item(7).StopTime = 15 * geoOneMinute
.Item(.StopTime = 30 * geoOneMinute
.Item(9).StopTime = 15 * geoOneMinute
.Item(10).StopTime = 30 * geoOneMinute
.Item(11).StopTime = 15 * geoOneMinute
.Item(12).StopTime = 15 * geoOneMinute
.Item(13).StopTime = 32 * geoOneMinute
.Item(14).StopTime = 15 * geoOneMinute
.Item(15).StopTime = 30 * geoOneMinute
.Item(16).StopTime = 15 * geoOneMinute
End With
oMap.ActiveRoute.Calculate
End Sub

The problem is that this is only one route out of twenty two routes that I need to import into Mappoint on a regular basis in order to get directions for our drivers for their daily routes.

Is it possible using Visual Basic in Access to import a route into Mappoint ? I have a query built that has the Pushpin Name, the Stop time and the stop order for each item in the route. Each item has a separate row in the query. From what I can tell, this is 'Waypoint' information that is needed to build a route in Mappoint.

It takes too much time to right now to manually build each route from scratch when a individual pushpin switches routes. It would be much faster to make the change in Access and then just import the new route into Mappoint.

Thanks,

Keith
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
access2000, basic, importing, route, 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 07:17 AM
Visual Basic 6.0 fantef MapPoint 2006/2009 Discussion 0 04-15-2004 12:41 PM
mappoint, visual c++ vs visual basic Anonymous MapPoint 2006/2009 Discussion 6 03-30-2004 10:17 PM
Visual Basic. NET and MapPoint Anonymous MapPoint 2006/2009 Discussion 1 07-30-2003 03:49 PM
Visual basic or visual c++ in mappoint misterb83 MapPoint 2006/2009 Discussion 1 02-14-2003 09:31 AM


All times are GMT -5. The time now is 07:42 AM.


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