Consider the data types of your variables:
- ; CORRECT SCALE OF OBJECT(DEFUN C:FXS () [color=red];; DS is a REAL[/color] (setq DS (getvar 'dimscale)) [color=red];; OS is a STRing[/color] (setq OS (getstring "\nOriginal Scale: ")) (PROMPT "\nPick object to SCALE : ") [color=red];; A is a PICKSET (or nil)[/color] (setq A (ssget)) [color=red];; DST is a STRing[/color] (setq DST (rtos DS 2 4)) [color=red];; Error since OS is a STRing (not a REAL)[/color] (setq OST (rtos OS 2 4)) [color=red];; Attempting to divide two STRings[/color] (SETQ SF (/ DST OST)) (COMMAND "scale" A "" PAUSE SF) (princ))
|