没有问题,下面是我自己做的一个例子,你也可以试试:
Sub main() Dim line As AcadLine Dim i As Integer Dim p1(2) As Double Dim p2(2) As Double p1(0) = 0: p1(1) = 0: p1(2) = 0 p2(0) = 5: p2(1) = 5: p2(2) = 5 ThisDrawing.StartUndoMark For i = 0 To 10 ThisDrawing.ModelSpace.AddLine p1, p2 Next
ThisDrawing.EndUndoMark End Sub |