Here is a script from Luis, My question is what is function of "if & and" ?,because in my opinion if this code without "if,and,progn",it will work too,I am not yet using or seldom to use if & and,thanks for your comment Another alternative... might be this: (vl-load-com) (defun C:SWT (/ first second obj1 obj2 a b) (if (and (setq first (car (entsel " Select text to switch: "))) (setq second (car (entsel " With this text: "))) ) ; end of and (progn (setq obj1 (vlax-ename->vla-object first) obj2 (vlax-ename->vla-object second) a (vlax-get obj2 'insertionpoint) b (vlax-get obj1 'insertionpoint)) (vlax-put obj1 'insertionpoint a) (vlax-put obj2 'insertionpoint b) ) ; end of progn ) ; end of if (princ) ) ; end of defun