Discussion:
Draw a line for Itlay
(too old to reply)
Boon
2010-04-28 14:37:28 UTC
Permalink
Hi,

I am using mappoint 2006 NA.

I would like to be able to draw a line between points in italy. I do this
via Access VBA. It does not work. no line is drawn. Is it something because
I use NA versio and try to draw a line in Itlaly?

Here is my code:

Itbl.Open "Map_Links"
Itbl.MoveFirst

On Error Resume Next

J = 0
Do While Itbl.EOF <> True

Address = Itbl.Fields(0).Value & ", " & Itbl.Fields(2)
Set locfrom = objmap.FindResults(Address).Item(J)

Address = Itbl.Fields(1).Value & ", " & Itbl.Fields(2)
Set locto = objmap.FindResults(Address).Item(J)

J = J + 1

' Create and name the shape
objmap.Shapes.AddLine locfrom, locto

objmap.Shapes.Item(J).Line.ForeColor = 11193702
objmap.Shapes.Item(J).Line.Weight = 0.57

Itbl.MoveNext
Loop


****************

The table that I read the data from is the following for example.

Map_Links FromCity ToCity Country
ANCONA CASALECCHIO DI RENO Italy
ANZANO DEL PARCO CASALECCHIO DI RENO Italy
ANZOLA DELL'EMILIA CASALECCHIO DI RENO Italy
ASTI CASALECCHIO DI RENO Italy



thanks!
B
Dee Earley
2010-04-28 15:31:32 UTC
Permalink
Post by Boon
Hi,
I am using mappoint 2006 NA.
I would like to be able to draw a line between points in italy. I do this
via Access VBA. It does not work. no line is drawn. Is it something because
I use NA versio and try to draw a line in Itlaly?
Itbl.Open "Map_Links"
Itbl.MoveFirst
On Error Resume Next
J = 0
Do While Itbl.EOF<> True
Address = Itbl.Fields(0).Value& ", "& Itbl.Fields(2)
Set locfrom = objmap.FindResults(Address).Item(J)
Address = Itbl.Fields(1).Value& ", "& Itbl.Fields(2)
Set locto = objmap.FindResults(Address).Item(J)
J = J + 1
' Create and name the shape
objmap.Shapes.AddLine locfrom, locto
objmap.Shapes.Item(J).Line.ForeColor = 11193702
objmap.Shapes.Item(J).Line.Weight = 0.57
Itbl.MoveNext
Loop
Do you get valid locFrom and LocTo objects?
If not, I expect it can't handle Italian address so MapPoint Europe may
be better.
--
Dee Earley (***@icode.co.uk)
i-Catcher Development Team

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)
Loading...