- (DEFUN C:TT (/ e1 ss i ent p10 p11 i)
- (defun MID (po1 po2)
- (setq po (MAPCAR '(lambda (X Y) (* (+ X Y) 0.5)) po1 po2))
- )
- (SETQ E1 (CDR (ASSOC 2 (ENTGET (CAR (ENTSEL "选择需要插入的块"))))
- SS (SSGET '((0 . "LINE")))
- I 0
- )
- )
- (IF (AND SS E1)
- (REPEAT (SSLENGTH SS)
- (SETQ ENT (SSNAME SS I)
- P10 (CDR (ASSOC 10 (ENTGET ENT)))
- P11 (CDR (ASSOC 11 (ENTGET ENT)))
- P1 (MID P10 P11)
- )
- (entmake (list '(0 . "INSERT")
- (cons 2 E1)
- (cons 10 p1)
- (cons 50 (ANGLE P10 P11))
- )
- )
- (SETQ I (1+ I))
- )
- )
- )
|