highflybird 发表于 2022-7-5 23:06:46

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))

ReMark 发表于 2022-7-5 23:37:24

Did you have a question?

highflybird 发表于 2022-7-6 00:30:13

No,only share.
页: [1]
查看完整版本: Autosave file sv$ to dwg file