Autosave file sv$ to dwg file
;;;(vl-directory-files (getvar "tempprefix") "*.sv$")(defun c:fix ( / desktopPath my_startapp tmpfilepath) (setq desktopPath (vl-registry-read "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders" "Desktop") ) (defun my_startapp (strings / obj_wsh) (setq obj_wsh (vlax-create-object "wscript.shell")) (vlax-invoke obj_wsh 'run strings 0 0) (vlax-release-object obj_wsh) ) (setq tmpfilepath (strcat desktopPath "\\sv$todwg")) (if (not (findfile tmpfilepath)) (vl-mkdir tmpfilepath)) (my_startapp (strcat "cmd /c copy " (getvar "tempprefix") "*.sv$" " " tmpfilepath "\\*.dwg")) (my_startapp (strcat "cmd /c copy " (getvar "savefilepath") "\\*.sv$" " " tmpfilepath "\\*.dwg")) (my_startapp (strcat "cmd /c copy " (getvar "savefilepath") "\\*.bak" " " tmpfilepath "\\*.dwg")) (princ)) Did you have a question? No,only share.
页:
[1]