Community of MapPoint and Virtual Earth Users and Developers
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 ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| CSV importing issues 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. |
| |||
|
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. |
![]() |
| Tags |
| csv, importing, issues |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |
Corfu Holiday
Why not enjoy the option of a Corfu holiday through UlookUbook? Check out the online offers...