Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| ||||
| 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. |
| |||
| 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. 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 |
| |||
| 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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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 |
| |||
| 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
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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 |
| |||
| Re: Automating Access and Mappoint
Hi, I assume this is posted in wrong thread ? If not then please clarify as I dont follow
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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 |
![]() |
| Tags |
| access, automating, mappoint |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |