MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




CSV importing issues

This is a discussion on CSV importing issues within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Today's Posts Twitter Feed 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 12-26-2003
Junior Member
White Belt
 
Join Date: Dec 2003
Posts: 3
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, _
geoImportFirstRowIsHeadings)


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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 12-26-2003
Junior Member
Yellow Belt
 
Join Date: Feb 2003
Posts: 28
Are you setting objApp equal to the MapPoint control you are trying to reference before trying to Set oDD = objApp.ActiveMap.Datasets?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 12-28-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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 )

Results:

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.
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
csv, importing, issues


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


All times are GMT -5. The time now is 05:27 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Corfu Holiday
Why not enjoy the option of a Corfu holiday through UlookUbook? Check out the online offers...



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 55 56 57 58 59