So putting it all together, will this do the job?
- (defun c:closer()(setq ans (getstring "All press A or just for current ")) ;;ans = the key pressed;;If carriage return (or space) is pressed(cond ((= ans "") (command "zoom" "all" "zoom" ".95x") ;;Zooms to 95% of full screen );;else if A (or any other character) is pressed;;Loops through tabs and zooms each tab in turn(t (vlax-for x (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object) ) ) (setq mylayout (vla-get-Name x)) (setvar "ctab" mylayout) (command "zoom" "all" "zoom" ".95x") )));;save and close the drawing (command "qsave") ;;saves the drawing (command "close" "y") ;;Closes the drawing
|