MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Automating Access and Mappoint

This is a discussion on Automating Access and Mappoint within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, I found following link: Getting started with the MapPoint Control and it is stated there: "With MapPoint 2004, 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
  #11 (permalink)  
Old 12-25-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Re: Automating Access and Mappoint

Hi,

I found following link: Getting started with the MapPoint Control and it is stated there: "With MapPoint 2004, the MapPoint Control is supported only in Microsoft Visual Basic 6.0 or later. This does not include Visual Basic for Applications (for example, the Visual Basic for Applications included with Microsoft Office)"

But the good news is that I also have found this:

Quote from the article "the application does not use the MapPoint OCX control. It uses an instance of MapPoint that is “pulled” into an Access form."
http://www.mp2kmag.com/articles.asp?ArticleID=74

But unfortionally the mp2kmag server seems down at the moment. But please try to check it. Also check the post form Eric (a little upper in this page). I think this is the solutions for you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12 (permalink)  
Old 12-25-2006
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,470
Blog Entries: 1
Re: Automating Access and Mappoint

You can get to the article text from Google's cache --

Home Locator Sample Application - MapPoint Articles - MP2K Magazine

Give it a minute or so to load as Google doesn't cache the images and it tries to load them from the server (that is down).


BTW, I did talk with iPowerWeb tech support again and they said the issue with my dedicated server has been escalated but to give them another 48 hours (since it is Christmas) to come up with a resolution which might mean migrating to another server... which will also take time. Could be a week! I do have a recent backup, maybe I should just started setting up on another ISP.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13 (permalink)  
Old 12-25-2006
AUR AUR is offline
Junior Member
White Belt
 
Join Date: Dec 2006
Posts: 11
Re: Automating Access and Mappoint

Hi

Well i do agree with you its not supported for VBA as far as the documentation says but my experience and some postings from other users on this forum suggests that it can work with Access form and I hardly managed to run this with access form.
How ? when you switch to design view directly while the form is open and reopen it it gives such an error like Mappoint failed to load etc however closing the form by using the window close button makes the mappoint map obect persistent in the OCX control. May be its working just for me but this is what i experienced.


That was the step1 of my work. My next step is to calculate the distance between two streets as selected in the text fields or combo boxes.

The Findresults method and others calculate and returns the collection
whereas i want to calculate the distance between streets selected exactly in the combo boxes.

1- What i want is to have all streets which can be selected from a drop down box with their latitudes and longitudes so that map point takes me directly to the location using GOTO method. The question is can mappoint import all streets with their lat/long for a specific region with few clicks to an excel sheet so that later i can import it in an access table and then populate my combo boxes.
2- Calculate the distance and cost between two streets. I do believe that it can be done using Route planner in map point, but how programmatically
that is when someone dont want to use the find/address tab of the mappoint for individual streets but want to select streets just from the drop down box and have cost/mile and distance automatically populated into another field.


Any help would really be admired and appreciated.

regards
AUR
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14 (permalink)  
Old 12-25-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Re: Automating Access and Mappoint

Hi,

So it finally works. Good. It's not very clear to me wy it works now and not before, and the article say it doesnt. But I do not know VBA environment.

About exporting all streets to Excel you can easy do that. What you have to do is scan the map in a given area with ObjectsFromPoint, adding streetnames to a list, and filter out duplicates. A Location object in MP2006 has a latitude/longitude property but since you are using MP2004 you have to reverse geocode it yourself. Also easy done, do a search to CalcPos on this forum. Code examples are in VB.

After you have the list with names you can store it into an Access table directly.

For calculating route look at the Route object. You can add waypoints to a route (see WayPoints object). And finally each WayPoint has his SegmentPreferences object. You can all do this from your own 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
  #15 (permalink)  
Old 12-25-2006
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,470
Blog Entries: 1
Re: Automating Access and Mappoint

Quote:
Originally Posted by ericwfrost View Post
BTW, I did talk with iPowerWeb tech support again and they said the issue with my dedicated server has been escalated but to give them another 48 hours (since it is Christmas) to come up with a resolution...
They got it back up! At least temporarily.. they haven't told me what the problem was yet

Eric
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16 (permalink)  
Old 12-25-2006
AUR AUR is offline
Junior Member
White Belt
 
Join Date: Dec 2006
Posts: 11
Re: Automating Access and Mappoint

Thanks eric and wilfried

Wilfried can u please elaborate further "ObjectsfromPoint" i tried in the mappoint standalone but i couldnt see anything regarding this. Infact i see Pushpins which can help in exporting all the data sets but here in Pushpins how to include all streets simultaneously at a time and then with just one single click i can have it exported in an excel sheet.

Because when you select a place in the map it is marked with a pushpin symbol , how can i mark several places to be included in my pushpin.

Also when i select an area in the map, right click and select 'Export to excel' it says 'No data found'.

Again Whats the best, quickest and only optimal way to export all streets?

many thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17 (permalink)  
Old 12-26-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Re: Automating Access and Mappoint

Hi,

I meanth totally in code, not in the standalone mappoint. ObjectsFromPoint returns a collection of Location objects. For each of this collection you can gather the streetnames.

So you start in code at a certain point, then step in increments of eg 25 meter next point and so on. Every street you sort in a list and filter on duplicates. After your whole area is scanned you save them in your database.

Does this make sence, because English is not my native language. If not re-ask, and I will try again
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18 (permalink)  
Old 12-28-2006
AUR AUR is offline
Junior Member
White Belt
 
Join Date: Dec 2006
Posts: 11
Re: Automating Access and Mappoint

Hi

There is no object in his control,

This is the message i used to receive in Access2003/VBA form integrated with MP2004 whenever i closed the form either manually or programmatically.

The form is working fine with all mappoint functionality, but i've to place the control again on the form.

This normally occurs when ur OCX control isnt displayed in the ACtive Xcontrols list, however its still there and i'm now stuck why it happens.

Any help would be greatly appreciated.
many thanks.
AUR
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #19 (permalink)  
Old 12-29-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
Re: Automating Access and Mappoint

Hi,

I assume this is posted in wrong thread ? If not then please clarify as I dont follow
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #20 (permalink)  
Old 01-22-2007
Junior Member
White Belt
 
Join Date: Jan 2007
Posts: 5
Re: Automating Access and Mappoint

New to this forum and Mappoint

I am trying to automate the importation of data either from Aces or Excel into mappoint.

I saw the home locator example, and that looked really great, I just do not know how to get my own data in there, or change the source table, or even see the code behind it all.

Ant help would be appreciated.

Thnaks in Advance,

Ross
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
access, automating, mappoint


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
Automating Mappoint using VB vennamreddy MapPoint 2006/2009 Discussion 1 10-07-2004 06:19 AM
Automating Mappoint Anonymous MapPoint 2006/2009 Discussion 3 07-26-2004 03:29 PM
Automating MapPoint with Perl Eric Frost MP2K Magazine Articles 12 07-15-2004 03:44 PM
Automating MapPoint with Perl Eric Frost MapPoint 2006/2009 Discussion 0 08-08-2003 06:10 PM
Automating MapPoint with the .NET SDK Anonymous MP2K Magazine Articles 2 10-21-2002 06:41 PM


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