|
|
发表于 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
! t6 `( x: j6 d B$ y/ b - With ThisDrawing
9 g% `2 t9 B& f% r% s - P2(0) = 10- y% N- `) j( v. m% c
- Set firstLine = .ModelSpace.AddLine(P1, P2)
1 a# b9 t& G3 h - Set firstCircle = .ModelSpace.AddCircle(P1, 5)1 V+ y4 {8 {5 D
- Set E(0) = firstLine
& K# o( h. A) I - Set E(1) = firstCircle4 V" e6 y& k' M# {$ R
- Set SS = .SelectionSets.Add("SS")
+ D2 [, B; G y* k6 z - SS.AddItems E9 J/ H" S. f5 R
- '
% [0 }( k! a" h8 l7 M$ V7 k5 e k8 W - '
. p( R0 B+ [- [: L/ P3 R! \) G - '7 i3 d X G7 ~, E
- SS.Delete
% ~* R" w6 f& c2 H - End With
! f% T! Z# q ? i3 M( I: u- ~' Z& e) \
复制代码 |
|