private IPolyline BreakLineToTwoPart_new(IPolyline myPolyline, double DisOnLine)
{
IPolyline[] Lines = new IPolyline[2];
bool isSplit;
int splitIndex, segIndex;
object o = Type.Missing;
myPolyline.SplitAtDistance(DisOnLine, false, false, out isSplit, out splitIndex, out segIndex);
IPolyline newLine = new PolylineClass();
ISegmentCollection lineSegCol = (ISegmentCollection)myPolyline;
ISegmentCollection newSegCol = (ISegmentCollection)newLine;
for (int j = segIndex; j < lineSegCol.SegmentCount; j++)
{
newSegCol.AddSegment(lineSegCol.get_Segment(j), ref o, ref o);
}
//重新构建两条线
lineSegCol.RemoveSegments(segIndex, lineSegCol.SegmentCount - segIndex, true);
lineSegCol.SegmentsChanged();
newSegCol.SegmentsChanged();
IPolyline oldLine = lineSegCol as IPolyline;
newLine = newSegCol as IPolyline;
Lines[0] = oldLine;
Lines[1] = newLine;
return newLine;
}