Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Im getting this error when trying to get the max of my list of numbers. What am I missing?
(defun c:TEST (/ MFF 1stk 2stk 3stk 4stk toc hpd b18 c18 d18 e18 f18 j3 j6 j9)
(setq MFF (getreal "Enter MFF :"))
(setq 1stk (car (entsel "\nSelect Front Left Stake: ")))
(setq 1stk (atof (getpropertyvalue 1stk "ELEV2")))
(setq 2stk (car (entsel "\nSelect Back Left Stake: ")))
(setq 2stk (atof (getpropertyvalue 2stk "ELEV2")))
(setq 3stk (car (entsel "\nSelect Back Right Stake: ")))
(setq 3stk (atof (getpropertyvalue 3stk "ELEV2")))
(setq 4stk (car (entsel "\nSelect Front Right Stake: ")))
(setq 4stk (atof (getpropertyvalue 4stk "ELEV2")))
(setq toc (car (entsel "\nSelect High TOC: ")))
(setq toc (atof (getpropertyvalue toc "ELEV2")))
(setq hpd (cons (list 1stk 2stk 3stk 4stk) hpd))
(setq hpd (apply 'max hpd))
(setq b18 (- MF 100))
(setq c18 (- MF toc))
(setq e18 (- hpd toc))
(setq f18 (+ e18 0.8))
(setq j3 (cons (list f18 b18 c18) j3))
(setq j3 (apply 'max j3))
(setq d18 (+ j3 100))
(setq j6 (+ toc j3))
(setq j9 (- j6 0.8))
(princ j3)
(princ j6)
(princ j9)
)
Solved! Go to Solution.