Hi i write a code to calculate fanctions in text . I want the results to have 2 decimals. I try to add
but is not working. Can you show me the correct way to do this ?Code:(rtos (cal (vla-get-textstring e)) 2 2 )
ThanksCode:(defun c:cal2 (/ e) (setq e (car (entsel "\Pick text: "))) (setq e (vlax-ename->vla-object e)) (vlax-property-available-p e 'textstring) (vla-put-textstring e (cal (vla-get-textstring e))) (princ) )