把样条线转化为多段线。 Sub sp2pl() Dim getsp As Object ‘获取样条线的变量 Dim newl() As Double ‘多段线数组 Dim p1 As Variant ‘获得拟合点点坐标 ThisDrawing.Utility.GetEntity getsp, po, "本程序将样条曲线转为多段线。请选择样条曲线" sumctrl = getsp.NumberOfControlPoints ‘计算样条线中一共有多少拟合点 ReDim newl(0 To sumctrl * 3 - 1) ‘重定义数组 For i = 0 To sumctrl - 1 ‘开始循环, p1 = getsp.GetControlPoint(i) ‘把拟合点坐标存到p1变量中 For j = 0 To 2 newl(i * 3 + j) = p1(j) Next j Next i Set templ = ThisDrawing.ModelSpace.Add3DPoly(newl) ‘画样条线 End Sub