I don't know if is ok with cond. I have a variable, nrpct, and i want to set some points this way : if nrpct=15 (for example), i want to set 15 points - point1, point2...point15 - in my case pz1, pz2 ...pz17. How to do it?
[code](defun MakeVar (numtest TTl lst num2add / this nmlst n suf) (setq i 6nmlst '(1) ) (if (setq this (member numtest (repeat TTl (setq nmlst (append nmlst (list (setq i (1+ i))) ) ) ) ) ) (set (setq n (read (strcat "pZ" (setq suf (itoa (car this)))))) (rtos (+ num2add (- (cadr (eval (read (strcat "p" suf)))) (cadr lst)) ) 2 2 ) ) );;; This lines will show you the Variable name and its value ;;;;; Remove hte princ/print lines to give you the value ;;; (princ (strcat "\nValue for " (vl-symbol-name n))) (print (eval n)) (princ);;; ;;;;;; (eval n); 23</p>p23 ----> not nil