How toStraighten Polyline Programatically with C#

Hi,
which command do I need to use, to straighten a polyline in c#?

var line = tr3.GetObject(lineId, _AcDb.OpenMode.ForWrite) as _AcDb.Polyline;
if (j % 10 == 0)
{
//something like line.straighten(j, j + 10)???
}


Thank you!


Comments

  • removing bulges?
    maybe set them all to zero?

    removing vertexs?
    maybe just removing the vertexs that are neither the ending or the beginning?