|
发表于 2009-5-30 21:12:01
|
显示全部楼层
来自: 中国
`1 I2 R$ v4 s- Dim E As AcadEntity, L As AcadLine, P As Variant0 C; o0 t' n: f/ p! I
- On Error Resume Next
% H/ R1 t* D2 D1 z6 N0 }6 \, m - With ThisDrawing
0 N0 n l/ h- ~3 F# s0 h& @ - Do
; \9 C* U* Z0 a8 q - .Utility.GetEntity E, P, vbCrLf & "选择直线:"
3 w# [7 h9 Q) R+ F; I; I j - If Err Then S- R9 ^) F# C# V, m
- Exit Sub
6 }" Z1 t! Q( M% } - ElseIf E.ObjectName = "AcDbLine" Then% n6 N. a. J5 {; R8 \0 E# L0 C
- Exit Do
3 i# l; U# A' t2 s2 p0 Y, p: A/ h - End If5 m5 v- D* w* w" \5 _" c$ E3 W
- Loop$ N0 d& N: n4 e3 r' T. ]
- Set L = E
1 \4 D9 z1 R4 O7 x& t1 S" Q - For Each E In .ModelSpace
' L1 }8 c R' ~' U) G - P = L.IntersectWith(E, acExtendNone)3 c* g! B# y Q1 o* ]- k
- If UBound(P) >= 2 Then E.Delete
( c( M, t' q# k - Next
1 L) D! S9 ?# ]. J - End With
4 r" s+ @9 L7 D: \' }; S
复制代码 |
|