If you use EZScript-PRO on AutoCAD 2010, simply put the command RIBBON at the beginning of your scripts.
You can also put this ion the ACAD.lsp file.
This will always make sure that the ribbon does not 'dissapear' when a script is run from the command line.
Read this Lisp Routine Topic and thought if we could add Bind Xrefs and Explode to the mix that this could be powerful. But do we even have to open the drawing?
Have it run the lisp Routine; Bind Insert Xrefs, Explode, Purge All, Zoom Extents, then Save
Any Help on this topic
;; purge, zoom and saves all drawings in a folder ;; By Abbas Aqdam (defun C:PZT ( / path files dwg sf ) (if (or (= (getvar "SDI") 0) (> (getvar "DBMOD") 0)) (alert "Please: \n\n1-SAVE and close all open drawing!\n\n2-Set SDI to 0") (progn (setq path "C:\\TEST\\") (setq files (vl-directory-files path "*.dwg" 1)) (if (> (length files) 0) (progn (setq sf (open (strcat path "T.SCR") "w")) (write-line "Filedia" sf) (write-line "0" sf) (foreach dwg files (write-line "open" sf) (write-line (strcat "\"" path dwg "\"") sf) (write-line "(command \"purge\" \"a\" \"*\" \"N\")" sf) (write-line "(command \"zoom\" \"e\" \"zoom\" \"s\" \"0.95x\")" sf) (write-line "qsave" sf) );foreach (write-line "Filedia" sf) (write-line "1" sf) (close sf) (command "script" (strcat path "t.scr")) );progn (Alert (strcat "There is no dwg files in " path "!")) );if );progn );if );defun
Refering to scottbolton's solution (message 7): This is a great tool. However I think if we could add 1 more function it would make it a super tool. Currently running this only opens and zooms to extents either the model or layout space the dwg was last saved in. I have dwgs that have multiple layouts that are saved wherever the last person who saved it was working at. If this could go to all of a dwgs layouts and model space to zoom extents it would be amazing!!!! Here is an individual dwg lsp I found for what I am describing. If there is a way we could combine the two it would be golden.
(defun C:ZEA (/ acad acdoc aclay)
(setq acad (vlax-get-acad-object)
acdoc (vla-get-ActiveDocument acad)
aclay (vla-get-ActiveLayout acdoc)
;; Modified by Bob Shaw 10-Nov-2011 for John Wagner at Davis Bews Design Group
(vlax-for layout (vla-get-Layouts acdoc)
(vla-put-ActiveLayout acdoc layout)
(if (/= "Model" (getvar "ctab"))
(vla-put-ActiveLayout acdoc aclay)