本帖最后由 作者 于 2002-8-5 14:27:08 编辑
我在以上代码中For Each循环前添加了一段代码,增加一个选择集,但运行时出错。
Dim SSel As AcadSelectionSet
Dim pt1(0 To 2), pt2(0 To 2) As Double
Set SSel = MyDocument.SelectionSets.Add("ss")
pt1(0) = PickPoint(0) - 100: pt1(1) = PickPoint(1) - 100: pt1(2) = PickPoint(2)
pt2(0) = PickPoint(0) + 100: pt2(1) = PickPoint(1) + 100: pt2(2) = PickPoint(2)
SSel.Select acSelectionSetCrossing, pt1, pt2
'程序运行到这出错,错误为“对象'Select'的方法'IAcadSelectionSets'失败”
'这是怎么回事望指教
For Each objEntity In SSel
.........
Next objEntity
[此贴子已经被作者于2002-8-5 11:51:03编辑过] |