|
|
发表于 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
* C* i8 A# k4 J% x& p' M - With ThisDrawing& ^3 z0 a+ `# D( q1 c* ?, l
- P2(0) = 10
4 }, Z7 a: C$ U) n. c d; Q$ c - Set firstLine = .ModelSpace.AddLine(P1, P2)
2 @+ R. D' Q1 @ - Set firstCircle = .ModelSpace.AddCircle(P1, 5)! g T' r% N) O& d Z
- Set E(0) = firstLine
3 d, `- ~5 }$ N6 _ j/ n5 S - Set E(1) = firstCircle3 p7 O$ i% x7 M3 D0 E! ?' w
- Set SS = .SelectionSets.Add("SS")
/ U) Y" M' n, P0 p V, y* g5 X - SS.AddItems E8 K" @9 i3 V, G/ r; e) [
- '
3 M3 v; l. y2 {/ } - '- e9 a/ P& N* K, }
- '8 ?% q/ W# b; W! d
- SS.Delete
& s$ l) C! W0 G" ` - End With
6 d! ?' {; L7 w$ b9 }8 U
复制代码 |
|