Hi all, I have banged my head against the wall trying to figure out what the heck is going on with my script, but to no avail. All I want is for this script to have as a return value "PORTTRAI" or "LANDSCAPE" (without the quotes). Instead, I get anything but, depending on the specifics of the coding. The closest I can get it is to output PORTRAIT"PORTRAIT" or LANDSCAPE"LANDSCAPE" WTF?! I guess I'm just not understanding how LISP (or AutoLISP more specifically) returns funtion values to the command line. Here's my code: ; Define the function (the program). (defun c:ORIENT ( / LMAX LMIN OLDCE OLDTE X1 Y1 RES) ; Save the current value of cmdecho then redefine it. (setq OLDCE (getvar "cmdecho")) (setvar "cmdecho" 1) ; Save the current value of texteval then set it to 1 (setq OLDTE (getvar "texteval")) (setvar "texteval" 1) ; OPERATION - store the result in LMAX. (setq LMAX (GETVAR "EXTMAX")) ; OPERATION - store the result in LMIN. (setq LMIN (GETVAR "EXTMIN")) (setq x1 (- (car LMAX) (car LMIN))) (setq y1 (- (cadr LMAX) (cadr LMIN))) (if (< x1 y1) (setq res "PORTRAIT") (setq res "LANDSCAPE")) ; Reset "cmdecho" to previous value. (setvar "cmdecho" OLDCE) ; Reset "texteval" to previous value. (setvar "texteval" OLDTE) ; Reset *error* to previous definition. (princ res) ) Basically, I want the plain text string outputted so that I can transparently call it from a scripted plot command, so it will automatically plot according to what the drawings dimensions are. I won't go into too much detail here, since it seems as though this is just a basic Autolisp question. How do I have the value of my "orient" function be just PORTRAIT or LANDSCAPE, without doing this strange double thing? Thanks for any help! Scott