how to draw a line between points

bobil
05-24-2006, 12:49 PM
Hi everybody,
I am totaly new to mappoint and mappoint "programming".
I don't know if it is the right place to post so please excuse me if I am wrong.

Let me explain my problem.
I have a list of locations and I would like to place them on a mappoint map and draw a line between them (just a normal straight line for the beginning).
The list of locations and "routes" can be in either excel, access or sql format and if possible i would like a vba macro to do it.

So is this possible ? and how ?

Thank you very much.

Bob.
PS : If you happen to know any good tutorials about how to use excel and mappoint please be kind enough to post the url.

Mohamed
05-25-2006, 02:36 AM
Hi,

Hope this will help:

1- Looking at the Mappoint HelpFile, you have this example:


Sub AddLineToMap(FromAddress1, To Address2)

Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc1 As MapPoint.Location
Dim objLoc2 As MapPoint.Location

'Configure l'application
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True

'Obtient deux lieux et les agrandit
Set objLoc1 = objMap.FindResults(FromAddress1).Item(1)
Set objLoc2 = objMap.FindResults(ToAddress2).Item(1)
Set objMap.Location = objLoc1

'Ajoute un trait reliant les deux lieux
objMap.Shapes.AddLine objLoc1, objLoc2

End Sub




2- You have to buy this book, you can find it in the homepage fo this website:

MP2K is pleased to offer MapPoint For Dummies to our North American readers at the lowest price available anywhere.

At $17.48 + $2.50 shipping, that is around $2 cheaper than other major Internet book retailers.

3- Do a search in this forum with keys as "excel", you will find all what you need

Ciao

WonderMonkey
05-25-2006, 08:23 AM
I have purchased the O'Reilly book. It arrives next week. If you are going to purchase a book I'll do a review on it if you wish.

 
Web mp2kmag.com
mapforums.com