楼上的程序“修复”的剖面线没有继承原来的属性。" |/ Y2 i4 S$ b% B8 ~! q
更正以下,没有继承图层属性。也没有必要。
( f$ x' n7 N( T0 |' y' x
" S0 [! t/ U3 C( M$ k# Q3 N(defun C:hath()
; z2 ^; @" r" _5 a- \(setq DIMENSION (car (entsel)))
# P" n, N2 L( y; t: o( `6 h- ^8 p(setq SSL NIL)3 y; k! c/ Z/ D' D+ A! `+ r
(setq ssL (ssadd)) 3 o& N2 w& P1 d8 Y e) s2 W" @
(ssadd DIMENSION SSL)
2 I7 J" e, W0 [& Z# [(setq DIMENSION (entget DIMENSION)): w9 O7 j6 c) R& w. u8 \
(setq no (cdr (assoc '98 DIMENSION))): ^* t1 }, D7 x7 h8 @
(setq name (cdr (assoc '2 DIMENSION)))% f- L5 q& X: K) |! A/ B! V4 W
(setq Scale (cdr (assoc '41 DIMENSION)))
0 ~1 _8 H0 A$ Y' U$ ]9 Y(setq angle (cdr (assoc '52 DIMENSION)))
( m5 A; R' L6 ~4 g9 K a# R(setq angle (angtos angle 0 0))6 `$ i+ K j$ s+ F
(if (<= no 3)' r' I0 }* u, P8 ]' ]0 w3 N6 t L" d
(progn
2 I; A/ M, |& U( p2 v: O$ {7 s& {(if (= no 1)
9 y- u4 [2 ]8 Z" }(progn& S9 ?5 J$ i7 \7 V1 n+ U
(setq l1 (length DIMENSION))4 t9 g3 B: X; M$ e4 a, x" i, V. D
(setq p1 (cdr (nth (- l1 1) DIMENSION)))/ |" b; a; q0 O& B* P
(command "-bhatch" "P" name Scale angle p1"")
N6 y& V. h% q6 L" J* w2 U(command "_erase" SSL "")
. i, g: t0 C: L: P))
+ Y! |. j1 K# a( r; g" g(if (= no 2)# s2 _4 O5 R. R) p: D' s
(progn0 V9 g1 z1 W& w2 R
(setq l1 (length DIMENSION))3 \" [% \$ s+ Q, ~' B6 S
(setq p1 (cdr (nth (- l1 1) DIMENSION)))
- z' G# f* w3 \. M(setq p2 (cdr (nth (- l1 2) DIMENSION))): R" D' |6 H( d3 r, U
(command "-bhatch" "P" name Scale angle p1 p2 "")
# U: L3 y, ]# T9 V, {(command "_erase" SSL "")
9 Y+ v, U& ~9 F% p8 {" R))
0 z, h. {. O0 f) j: ^1 v7 J: T(if (= no 3)
7 ?% O3 W+ C6 R# J5 o3 ~$ E(progn
& T8 {2 B( P1 W(setq l1 (length DIMENSION))
) H- D& S2 E f: O. V+ c. f: Q% H(setq p1 (cdr (nth (- l1 1) DIMENSION)))
7 n; H+ n% c% A(setq p2 (cdr (nth (- l1 2) DIMENSION)))
9 @7 o& }$ s7 m# f(setq p3 (cdr (nth (- l1 3) DIMENSION)))) i: a- O6 b* S! @
(command "-bhatch" "P" name Scale angle p1 p2 p3 "")
; @, c, z1 ?$ E$ U8 {(command "_erase" SSL "")
& m2 [& Z4 y2 `2 b) L5 {$ u))
5 a( _( t! Z ~))7 e- [% n9 K; W
(if (> no 3)(prompt "请选择简单图形!"))! A9 a3 b# z* ^" J- L Z1 h
) |