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
Results 1 to 3 of 3

CSV importing issues

This is a discussion on CSV importing issues within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello everyone. I am trying to import a CSV file and display it as a DataMap. The code is shown ...

  1. #1
    SideStep is offline Junior Member White Belt
    Join Date
    Dec 2003

    CSV importing issues

    Hello everyone. I am trying to import a CSV file and display it as a DataMap. The code is shown below

    Dim objApp As MappointControl
    Dim oDD As MapPoint.DataSets
    Dim oDS As MapPoint.DataSet
    Dim DM As MapPoint.DataMap
    szConn = "C:\testfile.csv"

    Set oDD = objApp.ActiveMap.DataSets
    Set oDS = oDD.ImportData(szConn, , _
    geoCountryDefault, _
    geoDelimiterComma, _

    Set DM = oDS.DisplayDataMap(geoDataMapTypeShadedArea)

    I get RTE 91 Object Variable or With Block not set. Its objecting to the line:
    Set oDD = objApp.ActiveMap.DataSets

    I have played around with this to no avail. I'm sure it is something simple but it has escaped me so far and I would appreciate any suggestions.

  2. #2
    Martel is offline Junior Member Yellow Belt
    Join Date
    Feb 2003
    Are you setting objApp equal to the MapPoint control you are trying to reference before trying to Set oDD = objApp.ActiveMap.Datasets?

  3. #3
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    I'm slowly making sense of this. I used this code with a csv file with the following fields Street Address, State/Province, City, Country. The file has 4 Canadian Address' and 1 US Address

    Dim objMap As MapPointCtl.Map
    Dim objdataset As MapPointCtl.DataSet
    Dim objdatamap As MapPointCtl.DataMap
    Set objMap = MPC.NewMap(geoMapNorthAmerica)
    Set objMap = MPC.ActiveMap
    Set objdataset = objMap.DataSets.ImportData("c:\test.csv", , geoCountryCanada, geoDelimiterComma)
    Set objdatamap = objdataset.DisplayDataMap(geoDataMapTypeShadedArea )


    1.This plots all 4 Canadian Address by Province fine, but doesn't plot the US address. If I use geoCountryUnitedStates or geoCountryMultiCountry - I get the message Incorrect parameter and nothing plots.

    2. If I use (geoDataMapTypeShadedArea,, geoshowbyCountry) the Address for both Canada and the US plot properly by Country

    3. If I use (geoDataMapTypeShadedArea,, geoshowbyCity), I get the messageError 4073 Cannot map data because the selected geography type is invalid

    Any insight into this? Also how do I get the legend and Map title to appear. Any help would be appreciated.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. MapPoint 2004 Performance Issues (c++)
    By nicolas in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 06-20-2006, 07:51 AM
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-14-2005, 02:40 PM
  3. option strict on issues
    By starbuck in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-16-2004, 05:36 AM
  4. Field Format issues with import from Excel
    By Verh0ef in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 03-31-2003, 12:42 AM
  5. Registry issues with MapPoint 2002
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 11-14-2002, 07:03 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