|
|
发表于 2009-5-30 21:12:01
|
显示全部楼层
来自: 中国
# E$ {6 u; g. t- Dim E As AcadEntity, L As AcadLine, P As Variant) Z/ o$ }/ K$ T
- On Error Resume Next3 X' {- y+ X* _2 P6 ~
- With ThisDrawing
) l: V! ~4 t7 K4 U4 x+ b7 P# w1 Z1 x - Do
H ?) o, V, T/ ]" x+ h6 o+ ? - .Utility.GetEntity E, P, vbCrLf & "选择直线:": Y3 E% S5 i( f+ F. P
- If Err Then
/ l0 ]/ d( u. z6 c3 h* W! g - Exit Sub( V! c! ~$ f" S% T3 {
- ElseIf E.ObjectName = "AcDbLine" Then
3 A( c$ c9 i* t/ X# f& j - Exit Do6 K* e: G! W& H5 k
- End If
# Z+ C7 j1 b+ L - Loop) K; l/ }6 L1 c# c8 `) G( i
- Set L = E o* B0 ^4 S5 |) h
- For Each E In .ModelSpace2 }5 v \. a, U( C- `2 _
- P = L.IntersectWith(E, acExtendNone)
; c7 \, F9 V! o( X6 x* n: |4 W. N - If UBound(P) >= 2 Then E.Delete
# g" X8 M, W7 \/ ~, i8 e" t - Next+ Y- \0 s+ }$ D
- End With7 M* e8 ?! A" ^: Q
复制代码 |
|