PDA

View Full Version : Automating matching postcodes



robertaw
11-12-2005, 01:26 PM
Of the 1500 addresses I am importing from an Excel spread sheet about 10% always need matching - however I fiddle around with the layout and contents of the addresess. In 99% of cases the first selection offered is perfectly acceptable and I won't worry about the 1% left.

However, I have to select each one and accept the change individually, which is a pain as I have to do this exercise on a weekly basis!!

Is there any way, even via VB, that I can do this automatically in one go - even if I have to press a button to set the process running?

Regards

Roberta

Wilfried
11-13-2005, 10:04 AM
Hi,

I hope I understeand what you want to do.

What you could do is programatically place the pushpins, check if it is on an address, and if not then find the nearest address by means of a vector, increasing the radius until you find an address on the circumfence. Then move it there. This for every position.

Mohamed
11-13-2005, 10:43 AM
Hi,

This is a supplement to Wilfried suggestion.
(Hi Wilfried, you undestand now why I am using camels in my delivery system, no chance to make them burning !!!! :lol: )

2 things:

1- Programmatically


In 99% of cases the first selection offered is perfectly acceptable

If you add the PushPins programmatically, just use the ResultsQuality property

geoFirstResultGood = It's what you are using
geoAmbiguousResults = One of the 2 first results is good.
(it's what you should choose. Programmatically you can get one of them )

as in this example:



Sub AddPushpinToGoodFindMatch()

Dim objApp As New MapPoint.Application
Dim objFR As MapPoint.FindResults

'Configure l'application
objApp.Visible = True
objApp.UserControl = True

'Get a FindResults collection
Set objFR = objApp.ActiveMap.FindResults("Seattle")

'If one of the two first results is good
If objFR.ResultsQuality = geoAmbiguousResults Then objApp.ActiveMap.AddPushpin objFR.Item(1)
Else
MsgBox "More than 2 choices"
End If

End Sub




2 Pragmatically :

If you correct your adresses once manually, and if your 1500 addresses
are not changing, just export the corrected Pushpins from Mappoint to Excel. Now, you have cleaned addresses in your Excel file. The next time you will not have to correct them again.

Ciao

Wilfried
11-15-2005, 01:24 PM
Hi Mohamed,

Thanks for supplement, it has been a while, welcome home :)
I understeand about the camels, they have many advantages :lol: