虎哥:我做了下面一个例子:
Sub testcommand() ThisDrawing.SendCommand "PLINE" & vbCr ThisDrawing.Activate Dim count As Integer count = ThisDrawing.ModelSpace.count Dim newobjs(0) As AcadEntity Set newobjs(0) = ThisDrawing.ModelSpace.Item(count) newobjs(0).Color = acMagenta
End Sub
但是好像不行,分析原因应该是ThisDrawing.SendCommand "PLINE" & vbCr完了以后还没有让用户在模型空间中画线就继续执行Set newobjs(0) = ThisDrawing.ModelSpace.Item(count),这样肯定不行,怎么样使得用户画完线后让程序停顿,等用户画完线后再执行下面的语句呢?