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

标签 autocad autocad-plugin dxf autolisp dwg

我在网上找到了这段代码,用于将 AutoCAD DWG 中的选择内容保存为项目文件夹中的 DXF 格式。我不太熟悉 AutoLISP。我需要更改什么才能将所有这些图纸保存在名为“CNC Parts”的子文件夹中?

;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

最佳答案

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

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

关于AutoCAD - 在子文件夹中另存为 DXF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49855950/

相关文章:

c# - AutoCAD resbuf 迁移

c# - 在AutoCAD中使用Editor类执行命令

java - DXF 文件插入实体

c# - 写入 dxf 或 dwg 格式?

csv - 从 Autocad 获取实体数据

c# - 使用 C# 在分解后删除 AutoCAD 绘图对象

python - 使用 Python 自动化 AutoCAD

vb6 - 诊断自愈 MSI

c# - AutoCAD 表格中的字体非常小

c# - 设置 Visual Studio 2013 来开发 AutoCAD 2015 插件