|
|
发表于 2009-5-30 21:12:01
|
显示全部楼层
来自: 中国
- : t- G% m2 N* |& |& c/ ~
- Dim E As AcadEntity, L As AcadLine, P As Variant
( ?, ?. Z" n% h" ]2 w - On Error Resume Next5 l+ b% p8 J; |
- With ThisDrawing
5 g* a- q; E% Q, B - Do2 z5 P+ I# _# m0 S( ]" B
- .Utility.GetEntity E, P, vbCrLf & "选择直线:") Y/ T* w w7 x. E8 \
- If Err Then& `% Q c0 M1 r6 Q- ]
- Exit Sub
& e- G; a$ D! T4 `4 x9 _ - ElseIf E.ObjectName = "AcDbLine" Then
* Z+ m# }) }3 N- d q- @& W- q5 I6 p* B - Exit Do
. S |, q; i) u - End If3 G0 Z/ t/ m1 e0 x j3 ?- Y8 N* h
- Loop
& X2 z u- c* R1 L( t- i - Set L = E
1 j+ ~" t$ N1 c1 b - For Each E In .ModelSpace* G, T$ T8 S, N/ b9 |6 [
- P = L.IntersectWith(E, acExtendNone)
% V1 ~5 D7 r+ ^2 ]1 ^: T& E0 g - If UBound(P) >= 2 Then E.Delete
3 U$ b" Y5 U0 l - Next
, M4 L. O6 F P8 }8 w - End With0 N# v2 R6 B% i. `& I
复制代码 |
|