码取之论坛,只是简单加了循环简单码,大家见笑了.
看看大家有没有跟我一样需要这样画线的,共享了.
高手可以给优化一下,让学习一下.
- ;;;;;;;;;
- (defun c:tt ()
- (setq en1 (entsel "\n指定基点:"))
- (setq pt1 (osnap (cadr en1) "nea"))
- (while
- (and
- (setq en2 (entsel "\n指定点连线:"))
- (setq pt2 (osnap (cadr en2) "nea"))
- )
- (command "_pline" pt1 pt2 "")
- )
- (princ)
- )
- ;;;;;;;;;;
- (defun c:ttt ()
- (setq pt1 (getpoint "\n定原始点:"))
- (while
- (and
- (setq pt2 (getpoint pt1 "\n请指定点连线:"))
- )
- (command "_line" pt1 pt2 "")
- )
- (princ)
- )
|