请问:为什么选择个数是0??而再次调用选择个数为1呢??
如:Sub sel() Dim p1(0 To 2) As Double Dim p2(0 To 2) As Double Dim x As Integer p1(0) = 100: p1(1) = 100: p1(2) = 0: p2(0) = 500: p2(1) = 500: p2(2) = 0 Call ThisDrawing.ModelSpace.AddLine(p1, p2) Dim sel As AcadSelectionSet Set sel = ThisDrawing.SelectionSets.Add("Objs") sel.Select acSelectionSetWindow, p1, p2 x = sel.Count MsgBox (x) sel.Delete End Sub
运行结果x=0;再运行一次x=1,再运行一次x=2
怎样能第一次就选中这条直线!!!
请教:怎样用矩形窗口选择自己所画的对象???
请各位兄台帮忙!!! |