|
|
发表于 2011-12-10 21:48:11
|
显示全部楼层
来自: 中国辽宁
SelectionSet 对象的 AddItems 方法,参数是要添加到选择集中的对象数组.- Dim firstLine As AcadLine, firstCircle As AcadCircle, P1(2) As Double, P2(2) As Double, E(1) As AcadEntity, SS As AcadSelectionSet
4 C; P& B3 T! i - With ThisDrawing* ~$ d! ?% A8 F" x! q
- P2(0) = 10 _! n- P# Q* k, n. v7 U [3 [
- Set firstLine = .ModelSpace.AddLine(P1, P2)6 U+ U+ K; T. T
- Set firstCircle = .ModelSpace.AddCircle(P1, 5)
2 j1 h" V* G* H- K - Set E(0) = firstLine; C: @% T( [% S% v0 L, p+ G: o
- Set E(1) = firstCircle2 w9 C, C' s* R
- Set SS = .SelectionSets.Add("SS")
h5 S1 d4 c% i# V; S - SS.AddItems E. p) V9 F/ ^0 A! g
- '
3 O5 ?1 O. A) o0 Y) l - '
2 s9 p. C8 `- I7 W - '
) b7 C% f- B2 b - SS.Delete
, y' j1 L" L) q p9 b - End With
9 }0 d3 a5 m* b ^: K9 L
复制代码 |
|