MapPoint Forums

MapForums

Community of VE/MapPoint 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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #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


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 11:44 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

Cheap Flights to Brussels
Book cheap flights to Brussels online today. Brussels is a city with diverse culture with over 100 museums to visit and an array of different architectural designs to view.

Italy Weather
Check out Italy Weather - Travel Counsellors details information on Italy including, weather, flights and accommodation.

Cheap Flight
Find cheap flights online at dealchecker.co.uk. We search the latest offers from the UK's leading Travel Agents, Tour Operators and Airlines.

Holidays to Cuba
For the best offers on holidays to Cuba, visit The Holiday Place today. Find a deal to suit you and your budget online!

Cheap Canaries Holidays
Are you hunting down cheap Canaries holidays? Well check out ulookubook.com to bag a great value holiday. There are numerous festivals taking place all year round. Why not book your holiday around one?

Holiday
For the holiday of your life, that is easy to plan, visit Travel.co.uk to see all the options.

Cheap Holidays in Portugal
Don't spend your hard earned money on travelling agents! Come to On The Beach, and see information on cheap holidays in Portugal.


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