;;;Edit ACADR14.LSP file ;;; (defun c:edr14lsp (/ fndlst cnt edfil vldsk) (setq edfil (getfiled "Edit Autolisp File" "c:/Program Files/AutoCAD R14/Support/acadr14.lsp" "lsp" 4)) (if (= 1 edfil) nil (progn (setq vldsk (open "c:/Program Files/AutoCAD R14/Vlisp/Vlide.dsk" "a") ) (if vldsk (progn (if dos_win nil (arxload "doslib14")) (setq dosplit (dos_splitpath edfil)) (setq cnt 1 strl (strlen edfil) ) (while (< cnt strl) (if (eq (substr edfil cnt 1) "\\") (if fndlst (setq fndlst (append fndlst (list cnt))) (setq fndlst (list cnt)) ) ) (setq cnt (1+ cnt)) ) (foreach n fndlst (setq edfil (strcat (substr edfil 1 (1- n)) "/" (substr edfil (1+ n)) ) ) ) (write-line "(editor" vldsk) (write-line (strcat "\t:CAPTION \"" (nth 2 dosplit)(nth 3 dosplit) "\"") vldsk) (write-line (strcat "\t:FILENAME \"" edfil "\"") vldsk) (write-line "\t:POINT 0" vldsk) (write-line "\t:APEX 1507332" vldsk) (write-line "\t:SIZE 31524076" vldsk) (write-line "\t:STATE :NORMAL" vldsk) (write-line "\t:RO nil" vldsk) (write-line "\t:FGC nil" vldsk) (write-line "\t:BGC nil" vldsk) (write-line "\t:LXC T" vldsk) (write-line "\t:LEX-ID :AL" vldsk) (write-line "\t:CLV nil" vldsk) (write-line "\t:TW 8" vldsk) (write-line "\t:LM 10" vldsk) (write-line "\t:CONTEXT :AUTOLISP" vldsk) (write-line "\t)" vldsk) (close vldsk) (command "'vlide") ) ) ) ) ;if (if (= (type edfil) 'STR) (progn (setq fstln (strlen edfil)) (load (substr edfil 1 (- fstln 4))) ) ;progn ) ;if (graphscr) )