I'm trying use this code to select text that has a number value, extract the text contents, and make calculations based on that.
(setq ent (entget (car (entsel "\nSELECT text: ")))
contents (cdr (assoc 1 ent))
8percent (rtos (* contents 0.08) 2 1)
);setq
But I keep getting [; error: bad argument type: numberp: nil]
I've done (type contents) and it comes back as STR, so RTOS should work, in my mind, anyway...
Does RTOS need to go in when I'm extracting assoc code 1 instead of during the calculation?