AutoCAD - 在子文件夹中另存为DXF

时间:2018-04-16 11:15:42

标签: autocad autocad-plugin dxf autolisp dwg

我在网上找到了这个代码,用于将AutoCAD DWG中的选项保存为项目文件夹中的DXF格式。我不熟悉AutoLISP。如何更改以将所有这些图纸保存在名为“CNC零件”的子文件夹中?

;save selection as dxf
(defun c:DQ ()
(setq dxfname (getstring 1 "\nFilename="))
(command "SAVEAS" "DXF" "VERSION" "2010" "OBJECTS" "CROSSING" "\\" "\\" "" "16" (strcat (getvar "dwgprefix") dxfname) "FILEDIA" "1")
); function

1 个答案:

答案 0 :(得分:2)

只需在路径和文件名之间添加子路径

(command "SAVEAS" "DXF" "VERSION" "2010" "OBJECTS" "CROSSING" "\\" "\\" "" "16" (strcat (getvar "dwgprefix") "CNC Parts\\" dxfname) "FILEDIA" "1")