我在CAD应用版中求助修改无数多段线高程的问题,没得到满意答复,现我用VBA解决,有点问题,现求助,代码如下: Sub xx() Dim returnobj As AcadEntity Dim basepnt As Variant Dim pl1 As AcadLWPolyline Dim pt1(0 To 9998) As Double ActiveDocument.Utility.GetEntity returnobj, basepnt, "选择多段线:" gc = InputBox("修改后高程:", gc) retCoord = returnobj.Coordinates For Number = LBound(retCoord) To UBound(retCoord) + 2 - 2 Step 2 pt1(k) = retCoord(Number) pt1(k + 1) = retCoord(Number + 1) pt1(k + 2) = gc k = k + 3 Next returnobj.Delete Close #1 10 pt1(k) = pt1(k - 3) pt1(k + 1) = pt1(k - 2) pt1(k + 2) = gc k = k + 3 If k < 9999 Then GoTo 10 Set pl1 = ThisDrawing.ModelSpace.AddLightWeightPolyline(pt1) End Sub 但运行总提示"数组中元素太少或总元素数目不是3的倍数" 把lwpolyline换为polyline可运行,但多段线的高程仍为0,请问我要怎样修改