;| 3c.lsp Enhancement to 3DORBIT that 1) prompts for 3DORBITCTR point and accepts [Enter] for AutoTarget, 2) temporarily turns off the annoying display of the grid if it is on, 3) optionally avoids unpredictability with UCS's other than the WCS, 4) displays 3Dorbit keyboard options on command line for AutoCAD 2007+. Command: 3C Select 3Dorbit center point, or [Enter] for AutoTarget: _endp of 1:const 2:free 3:cont 4:dist 5:swiv 6:walk 7:fly 8:zoom 9:pan Press ESC or ENTER to exit, or right-click to display shortcut-menu. by Bill Gilliss bill at realerthanreal dot com Comments and suggestions always welcome. No warranty, either expressed or implied, is made as to the fitness of this information for any particular purpose. All materials are to be considered 'as-is', and use thereof should be considered as at your own risk. ver 1.0 Jan 25 2010 - initial public release Keywords: AutoCAD AutoLISP 3Dorbit 3Dorbitctr options =========================================================================== |; (defun c:3c ( / *gridmode *cmdecho cleanup ctrpt CADver) (defun cleanup (msg) ; <<< UN-COMMENT NEXT LINE IF PERFORMANCE IN NON-WCS UCS IS ERRATIC >>> ; (command "._ucs" "_p") (setvar 'gridmode *gridmode) (setvar 'cmdecho *cmdecho) (setq *error* *error) ) (setq *error *error*) (setq *error* cleanup) (setq CADver (atoi (substr (getvar "acadver") 1 2))) ;; i.e., 17, 18, etc. (setq *cmdecho (getvar 'cmdecho)) (setq *gridmode (getvar 'gridmode)) (setvar 'cmdecho 0) (setvar 'gridmode 0) ; <<< UN-COMMENT NEXT LINE IF PERFORMANCE IN NON-WCS UCS IS ERRATIC >>> ; (command "._ucs" "_w") (prompt "\nSelect 3Dorbit center point, or [Enter] for AutoTarget: ") (setq ctrpt (getpoint)) (if (> CADver 16) ;;for 2007 and up (prompt (strcat "\n1:const 2:free 3:cont 4:dist 5:swiv " "6:walk 7:fly 8:zoom 9:pan\n")) ) (if ctrpt (command "._3dorbitctr" ctrpt) (command "._3dorbit") ) (cleanup) (princ) ) (prompt "3c loaded.") (princ)