Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Automating Access and Mappoint

This is a discussion on Automating Access and Mappoint within the MapPoint Desktop 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 ...

  1. #11
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    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.

  2. #12
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    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.

  3. #13
    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

  4. #14
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    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.

  5. #15
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    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

  6. #16
    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

  7. #17
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    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

  8. #18
    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

  9. #19
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Automating Access and Mappoint

    Hi,

    I assume this is posted in wrong thread ? If not then please clarify as I dont follow

  10. #20
    rsilberfarb is offline 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

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Automating Mappoint using VB
    By vennamreddy in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-07-2004, 06:19 AM
  2. Automating Mappoint
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 07-26-2004, 03:29 PM
  3. Automating MapPoint with Perl
    By Eric Frost in forum MP2K Magazine Articles
    Replies: 12
    Last Post: 07-15-2004, 03:44 PM
  4. Automating MapPoint with Perl
    By Eric Frost in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 08-08-2003, 06:10 PM
  5. Automating MapPoint with the .NET SDK
    By Anonymous in forum MP2K Magazine Articles
    Replies: 2
    Last Post: 10-21-2002, 06:41 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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