我在VBA中想把一直线旋转一定的角度,但是程序总是提示错误,大家帮我看看
这是源代码:
Sub a() Dim a As Object Dim lineobj As AcadLine Dim lineobj2 As AcadLine Dim startpnt As Variant Dim endpnt As Variant startpnt = ThisDrawing.Utility.GetPoint(, "a point") endpnt = ThisDrawing.Utility.GetPoint(startpnt, "another point") Set lineobj = ThisDrawing.ModelSpace.AddLine(startpnt, endpnt) lineobj.Rotate starpnt, 1.57 lineobj.Update End Sub
提示错误是块或变量没有设置,请问这是什么原因?