把if换成while就行了
 - (defun c:vv (/ D E N P0 P1 SS)
- (setq d (getdist "\n延伸长度:"))
- (while (and (setq p0 (getpoint "\n框选对象第一对角点(会以此点做为延伸方向):"))
- (setq p1 (getcorner p0 "\n框选对象另一对角点:"))
- (setq ss (ssget "c" p0 p1 '((0 . "LINE,ARC,ELLIPSE,*POLYLINE"))))
- )
- (progn
- (command "lengthen" "de" d)
- (repeat (setq n (sslength ss))
- (command (list (setq e (ssname ss (setq n (1- n)))) p0))
- )
- (command "")
- )
- )
- (princ)
- )
|