664571221 发表于 2024-10-13 16:27:08

各位大神看下,求输入TT,把当前打开的图纸复制一份到桌面文件夹 你好123下面

各位大神看下,求输入TT,把当前打开的图纸复制一份到桌面文件夹 你好123下面

VBALISPER 发表于 2024-10-13 17:09:25

(defun c:tt ()
(vl-load-com)
(setq        thisdrawing
       (vla-get-activedocument
           (vlax-get-acad-object)
       )
)

(setq filename (getvar 'DWGNAME))
(setq        deskpath (strcat (vla-item (vlax-get (vlax-create-object "WScript.Shell") 'SpecialFolders ) "Desktop") "\\" ))
(setq fname (strcat deskpath "你好123\\" filename))

(vla-SaveAs thisdrawing fname acR14_DWG)
(princ)
)

永不言弃 发表于 2024-10-13 16:55:21

你试试这个
(vl-file-copy
(strcat (getvar "DWGPREFIX") (getvar "DWGNAME"))
(strcat "C:\\Users\\Administrator\\Desktop\\你好123\\" (getvar "DWGNAME"))
)

kozmosovia 发表于 2024-10-13 23:33:25

wblock * 最简单。
页: [1]
查看完整版本: 各位大神看下,求输入TT,把当前打开的图纸复制一份到桌面文件夹 你好123下面