MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




i want to use this example but it don't work

This is a discussion on i want to use this example but it don't work within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, I use Mappointcontrol and visual basic 6. I want to use this code but when i execute my program ...


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

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 02-20-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
i want to use this example but it don't work

Hello,
I use Mappointcontrol and visual basic 6.
I want to use this code but when i execute my program it tell : "Erreur d'execution : -2147024809" on the line "Set mpDataSet = mpDatasets.ImportData......"
Can someone help me ??
Sorry for my bad english but i'm french

My excel file structure is :

A1:Latitude A2:48°52
B1:Longitude B2:2°20
C1:City C2:Paris

My code is :

Dim mpApp As MapPoint.Application
Dim mpDatasets As MapPoint.DataSets
Dim mpDataSet As MapPoint.DataSet
Dim myExampleArray(3, 2)

'Start MapPoint
Set mpApp = New MapPoint.Application
mpApp.Visible = True
mpApp.UserControl = True

'Get the DataSets collection
Set mpDatasets = mpApp.NewMap.DataSets

'Create the ArrayOfFields descriptions

'Field is specified by name
myExampleArray(1, 1) = "Latitude"
'tells MapPoint to use this field as the latitude field
myExampleArray(1, 2) = geoFieldLatitude

'Field again specifed by name
myExampleArray(2, 1) = "Longitude"
'tells MapPoint to use this field as the longitude field
myExampleArray(2, 2) = geoFieldLongitude

'Field is listed by index, rather than name
myExampleArray(3, 1) = 1
'tells MapPoint to use this field as additional (non geocoding) information
myExampleArray(3, 2) = geoFieldData



'Perform the import
Set mpDataSet = mpDatasets.ImportData("c:\foo.xls!Feuil1!A1:B3", myExampleArray)

'The (x,2) elements are of the type GeoFieldType or string.
'If string, then they set the new name of the field, and
'MapPoint assumes that the field is a nongeocoding data field.
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 02-20-2004
Winwaed's Avatar
Mapping-Tools.com
Red Belt
 
Join Date: Feb 2004
Posts: 899
Blog Entries: 10
Stephane, well your English beats my French and I sat through yers of it at school!

Have you tried putting the longitudes and latitudes as decimal angles?

eg. Latitude = 48 + (52 / 60) = 48.866667

(the 52 being minutes of arc, so divide by 60)

MapPoint seems to work in decimal angles rather arc-minutes and arc-seconds.

Richard
__________________
Winwaed Software Technology LLC
http://www.winwaed.com
See http://www.mapping-tools.com for MapPoint Tools
Pre-Order MapPoint 2009 today: http://www.mapping-tools.com/mappoint2009
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 02-20-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
yes i 've tried but it doesn't seem to work.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Salut Stephane,
Tu as suivi l'exemple de l'aide de MapPoint.
Erreur dans la definition du tableau:

Dim myExampleArray(1 to 3, 1 to 2)

Ou alors modifie tes indices à partir de 0

Bon courage,
PP
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
work


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
Work with mapinfo by VB6, help me!!! Anonymous Other Mapping Platforms 6 08-07-2008 01:09 PM
Will MapPoint Work for Me budzinsk MapPoint 2006/2009 Discussion 2 06-07-2005 07:47 PM
.Net frame work ?? pratap MapPoint 2006/2009 Discussion 4 01-21-2005 06:09 AM
does mappoint2002 work with win 95 Anonymous MapPoint 2006/2009 Discussion 0 06-24-2003 08:45 AM
UDL to SQLServer doesn't work (C#) Anonymous MapPoint 2006/2009 Discussion 0 04-03-2003 06:50 AM


All times are GMT -5. The time now is 03:30 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


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