试了风魔飘香的方法,确实可行 只是程序效率很低 For x = 0 To 15 For y = 0 To 15 225个循环用了6秒时间 For x = 0 To 15 For y = 0 To 15 zx(0) = Pnt1(0) + x * txtheight / 3 - txtlong / 2: zx(1) = Pnt1(1) + y * txtheight / 3 - txtheight ys(0) = zx(0) + txtlong: ys(1) = zx(1) + 2 * txtheight oSSet.Select acSelectionSetCrossing, zx, ys If oSSet.Count = 0 Then Set textObj = ThisDrawing.ModelSpace.AddText(num, cp, txtheight * 0.75) end if oSSet.Clear Next Next 请问怎样才能提高寻找的效率呢???? |