Hi all,
I've figured it out with the help of all the info on this forum. Here's my vb6 code, I hope it saves someone else of 2 days of hell!!
Here's the bit that calculates distance between all the vertices for the selected freeform shape.
Code:
Dim curshape As Integer
Dim objLoc1 As MapPointCtl.Location
Dim objLoc2 As MapPointCtl.Location
Set obj1 = objMap.Selection
'curshape = obj1.Name
n = UBound(obj1.Vertices)
dist = 0
i = 0
Text6.Text = 0
For i = 0 To (n - 1) ' loop through all the points
Set objLoc1 = obj1.Vertices(i)
Set objLoc2 = obj1.Vertices(i + 1)
dist = dist + objMap.Distance(objLoc1, objLoc2)
Next i
' calculate the distance from the end point back to the start point
Set objLoc1 = obj1.Vertices(0)
Set objLoc2 = obj1.Vertices(i)
dist = dist + objMap.Distance(objLoc1, objLoc2)
Text6.Text = Int(dist)
obj1.SizeVisible = True
It's not the best code as I'm not that good but it works and I'm chuffed!!!
Time for a beer!
Cheers
Phil