The Length of IPolyLine

Discussion created by burabolin on Aug 9, 2011
Latest reply on Aug 21, 2011 by burabolin
I try to get the length of polyline. I thought this is a little simple.
But, it doesn't work as I thought.:confused:

I added three points to pointcollection.

Dim pPntCol As IPointCollection = New IPolyLine

Here, pPoint is the mouse clicked point.
the length of 1st segment is 30, and 2nd segment is 60, therefore entire length is 90.
after that, I deleted last point from pPntCol.

pPntCol.RemovePoints(pPntCol.PointCount - 1, 1)

then, I tried to get the length of ployline.

Dim pPolyLine As IPolyLine = pPntCol.
Dim len As Double = pPolyLine.Length()

The value of len is 90, still!!!
Why? I expected 30, because I deleted last point.
Is there anything I missed? Maybe... but I don't know.
Please review above codes and collect wrong points.