请各位帮忙看一下这个为什么不能运行:
Sub sn() ThisDrawing.SendCommand "_line 0,100 319,100 " Dim i As Single Dim x As Single Dim y As Single pi = 3.1415926 For i = 0 To 2 * pi Step 0.1 x = 50 * i y = 100 + 75 * Sin(i) ThisDrawing.SendCommand "_point x,y " Next i End Sub
运行老提示,画的点无较,我是刚刚用VBA弄CAD以前老用LISP,请会的告诉一下
Sub sn() ThisDrawing.SendCommand "_line 0,100 319,100 " Dim i As Single Dim x As Single Dim y As Single pi = 3.1415926 For i = 0 To 2 * pi Step 0.1 x = 50 * i y = 100 + 75 * Sin(i) ThisDrawing.SendCommand "_point " & x & "," & y & " " Next i End Sub