- (defun c:tt(/ e1 p bname ss n)
- (defun getdxf(num e)(cdr(assoc num(entget e))))
- (setq e1(entsel"\n选择块:"))
- (if (and e1(=(getdxf 0(car e1))"INSERT"))
- (progn
- (setq p (getpoint "\n指定一点:"))
- (if p
- (progn
- (setq bname(getdxf 2(car e1))
- ss(ssget "x" (list(cons 0 "INSERT")(cons 2 bname)))
- )
- (repeat (setq n(sslength ss))
- (entmake (list '(0 . "LINE")
- (cons 10 p)
- (cons 11 (getdxf 10(ssname ss (setq n(1- n)))))))
- )
- )
- )
- )
- )
- (princ)
- )
|