|
发表于 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 |9 |4 Z8 d% }7 g. E
- With ThisDrawing
' C( _3 _8 \) j# O; J - P2(0) = 10
2 p. M6 ?1 f: E m, V ?) ^8 ]% J" U - Set firstLine = .ModelSpace.AddLine(P1, P2)7 D1 o$ M1 K) a% c
- Set firstCircle = .ModelSpace.AddCircle(P1, 5)( [, {2 J L3 y) V
- Set E(0) = firstLine
& F9 U7 y8 T/ p5 z - Set E(1) = firstCircle
% C( `7 s8 n2 T: v - Set SS = .SelectionSets.Add("SS")
) I t5 Q! S3 S N5 M$ w - SS.AddItems E
c2 I" \& b' E/ o - '
$ c$ C8 w# x+ F" f2 q) ~ - '
; H* s/ x4 y, b0 W/ G - '/ P* ?9 e$ i: z" S$ i# C" P
- SS.Delete' O" f6 f2 z5 _+ R5 g
- End With( D: t% I% y: H/ ?5 D; m* J
复制代码 |
|