 - (DEFUN C:PP (/ oldEcho FirstPt ptlst NextPt)
- (setq oldEcho (getvar "CMDECHO"))
- (setvar "CMDECHO" 0)
- (setq FirstPt (GETPOINT "\nFirst point: "))
- (setq ptlst (list FirstPt))
- (while FirstPt
- (setq NextPt (getpoint FirstPt "\nNext point: "))
- (if NextPt
- (progn
- (command "zoom" "c" NextPt "")
- (setq ptlst (cons NextPt ptlst))
- (GrVecs (getvlist ptlst))
- )
- )
- (setq FirstPt NextPt)
- )
- (if (> (length ptlst) 1)
- (progn
- (command "pline")
- (foreach pt ptlst
- (command pt))
- (command "")
- )
- )
- (setvar "CMDECHO" oldEcho)
- (princ)
- )
- ;;;;;--------------------------
- (defun getvlist (lst / RetLst idx)
- (setq idx 0)
- (repeat (1- (length lst))
- (setq RetLst
- (append
- RetLst
- (list (list (car (nth idx lst)) (cadr (nth idx lst))))
- (list (list (car (nth (1+ idx) lst))
- (cadr (nth (1+ idx) lst))))))
- (setq idx (1+ idx))
- )
- RetLst
- )
|