|
|
发表于 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- |% J* E) Z) P' R
- With ThisDrawing$ t m7 K) b0 s& R4 I7 s5 y* _
- P2(0) = 10
8 s1 s; e. r C3 u6 M! R - Set firstLine = .ModelSpace.AddLine(P1, P2)
. _3 Y( ^+ ?8 a8 ^4 [8 c: @" [( p - Set firstCircle = .ModelSpace.AddCircle(P1, 5)
7 f3 O) A; Q* x( a; b - Set E(0) = firstLine2 K. D- x( d' v5 G8 R$ j
- Set E(1) = firstCircle
% A l4 [! P6 a8 W, O; N - Set SS = .SelectionSets.Add("SS")! s1 h3 K0 j- Y$ I1 y) o
- SS.AddItems E
; Q4 _8 e& d% P3 C9 K - '
3 Y5 |: ?* S& a7 W j4 } - '- K9 q, y9 w/ o
- '% W9 c m4 i- G; D& b) D1 w
- SS.Delete
4 E6 q9 p& B3 i' F/ u# a - End With
7 u2 V: |, G. Z" _9 x: \2 @
复制代码 |
|