|
|
发表于 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) R) Z! K! o( Y
- With ThisDrawing4 i5 v* m; ?# |8 H& d7 [9 o6 F
- P2(0) = 103 R) H/ J6 a D, K& ~
- Set firstLine = .ModelSpace.AddLine(P1, P2)
! K' T% v9 P; u6 R4 R6 r" {3 W - Set firstCircle = .ModelSpace.AddCircle(P1, 5)7 J# x4 h% F0 |( b& p( l, w
- Set E(0) = firstLine7 j1 }# w2 f" y
- Set E(1) = firstCircle
) o: l7 F9 Q: C, `3 E - Set SS = .SelectionSets.Add("SS")
/ l2 H: F- |' Q. P5 B - SS.AddItems E
/ ~9 F/ V d" Y% Q - '
7 Y4 |* C% Q6 e$ |( x3 x2 i) Q - '1 P/ Q2 ^/ b& x
- '
6 c# f9 f0 I+ E3 h2 N) z - SS.Delete
# W, n# I, t0 I - End With2 y e0 d+ {" z5 @! n
复制代码 |
|