MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Almost there..........Plotting wrong thing!!!

This is a discussion on Almost there..........Plotting wrong thing!!! within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, Great little community you got going here. I hope you can help me. I'm incredibly new to this stuff.......only ...


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

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 10-10-2007
Junior Member
White Belt
 
Join Date: Oct 2007
Posts: 3
Almost there..........Plotting wrong thing!!!

Hello,

Great little community you got going here. I hope you can help me.

I'm incredibly new to this stuff.......only been at it for 2 days.



I've got a series of text files that I want to read into MapPoint one by
one.

I've almost done it but.........

Currently my code does:

Import text file
Plot as shaded postcode sectors
Copy & Pastes map back into excel

The problem I have is that it does not map the right variable in my data.
I want it to map PSECTOR_TYPE, but I think it is just mapping CLUB_CODE.

Or is it mapping all the PSECTORs in the file and the name it gives it is the
name of the file.

The data I am trying to map looks like this:
CLUB_CODE PSECTOR PSECTOR_TYPE
5400 MK12 6 CORE
5400 MK13 7 CORE
5400 MK14 6 CORE
5400 MK14 7 CORE
5400 MK16 0 CORE
5400 MK2 2 CORE
5400 MK2 3 CORE
5400 MK3 6 CORE
5400 MK3 7 CORE
5400 MK6 2 CORE
5400 MK6 3 CORE
5400 MK6 4 CORE
5400 MK6 5 CORE
5400 MK10 9 SECONDARY
5400 MK11 1 SECONDARY
5400 MK12 5 SECONDARY
5400 MK13 0 SECONDARY
5400 MK13 8 SECONDARY
5400 MK13 9 SECONDARY
5400 MK14 5 SECONDARY
5400 MK15 9 SECONDARY
5400 MK16 8 SECONDARY
5400 MK16 9 SECONDARY
5400 MK18 1 SECONDARY
5400 MK3 5 SECONDARY
5400 MK4 1 SECONDARY
5400 MK4 2 SECONDARY
5400 MK5 6 SECONDARY
5400 MK5 7 SECONDARY
5400 MK7 8 SECONDARY
5400 MK8 0 SECONDARY
5400 MK8 8 SECONDARY

<tab-delimited>

The code as it currently stands:
HTML Code:
Sub attempt3()
Dim objField As MapPoint.Field
Dim objDataMap As MapPoint.DataMap
Dim objDataSet As MapPoint.DataSet
Dim PSECTOR_TYPE As MapPoint.Field
Set objMapPoint = CreateObject("MapPoint.Application")
Set objMap = objMapPoint.NewMap
'objMapPoint.Visible = True
'objMapPoint.UserControl = True
Set colDatasets = objMapPoint.NewMap.DataSets
Set objDataSet = colDatasets.ImportData("C:\Documents and Settings\Matthew Southgate\My Documents\_HOMEWORK\Samples\5400.txt", , geoCountryEurope, geoDelimiterTab)
objDataSet.ZoomTo
Set objDataMap = objDataSet.DisplayDataMap(geoDataMapTypeShadedArea, , , , geoRangeTypeUniqueValues, geoRangeOrderLowToHigh, 2)
objDataMap.LegendTitle = "Core & Secondary Postcode Sectors"
objMap.SaveAs ("C:\Documents and Settings\Matthew Southgate\My Documents\_HOMEWORK\Saved File.ptm")
objMap.CopyMap
ActiveSheet.Paste
End Sub
The map currently looks like:


and I want it to look like:


Can anyone of you helpful people assist?
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 10-12-2007
Member
Green Belt
 
Join Date: Oct 2003
Location: London
Posts: 97
Re: Almost there..........Plotting wrong thing!!!

Hi there

As far as I can see you don't set objField to be PSECTOR_TYPE. Also given the format of postcode sectors you'd be better reading them as comma delimited. Finally if you're using MPE2006 read the postcode sector names in lower case because there is a casing bug and you'll get some strange results otherwise.

Set objDataSet = colDataSets.ImportData("C:\Documents and Settings\xxx\xx\xx.txt", , geoCountryEurope, geoDelimiterComma, geoImportFirstRowIsHeadings)
Set objField = objDataSet.Fields("PSECTOR_TYPE")
Set objDataMap = objDataSet.DisplayDataMap(geoDataMapTypeShadedArea , objField)

Hope this helps
__________________
David
MapPoint Europe Gallery at http://www.broomanalysis.plus.com/gallerylist.html
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


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/almost-there-plotting-wrong-thing-6519.html

Posted By For Type Date
Reverse Geocoding with MapPoint 2002 - MapPoint Articles - MP2K Magazine This thread Refback 10-14-2007 01:29 PM
The Magazine for MapPoint - MP2K Magazine This thread Refback 10-10-2007 02:52 PM

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
Recordset exception. What am I doing wrong? Anonymous MapPoint 2006/2009 Discussion 3 01-25-2005 02:26 PM
What am i doing wrong??? alt-088 MapPoint 2006/2009 Discussion 2 09-16-2004 03:37 PM
The Best Thing Since Sliced Bread Anonymous News and Announcements 0 03-23-2004 11:02 PM
[Invalid Pointer] : what's wrong ? Vincent BENNER MapPoint 2006/2009 Discussion 1 11-18-2002 11:47 AM
Wrong answer from ConvertToLatLong dpietrocarlo MapPoint 2006/2009 Discussion 2 09-20-2002 03:18 PM


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


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

Bulgaria Ski Holidays
First time skier? Looking for something a little different? Bulgaria Ski holidays could be the perfect remedy to your winter blues. Bulgaria prices are great value.

Flights to Spain
Find and book flights to Spain. Travel Counsellors can help with travel to Spain including flights and accommodation.

Turkey Holidays
Istanbul is Turkey's prime attraction as it has the most beautiful mosques and palaces of the country; it has Byzantine churches and Roman temples. Book Turkey Holidays online.

Dubai Holidays
Dubai holidays provide you with exotic sights, desert safaris and superb cuisine. There is an extensive range of things to do and see!

Turkey
Before booking a holiday to Turkey check out the ULookUBook travel guide. Find out about the rich culture in Turkey before you go there to help you to make the most of your holiday.

Bargain family holidays
We can help you find family holidays at bargain prices when you check out the options at Travel.co.uk

Cheap holidays in Cyprus
Stunning coastline! Beautiful beaches! Cheap holidays in Cyprus, available at On The Beach.


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