2

I found this code online to save a selection from an AutoCAD DWG into a DXF format in the project folder. I am not well versed in AutoLISP. What do I need to change to save all of these drawings in a subfolder called "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

1 Answers1

2

Just add subpath between path and filename

(command "SAVEAS" "DXF" "VERSION" "2010" "OBJECTS" "CROSSING" "\\" "\\" "" "16" (strcat (getvar "dwgprefix") "CNC Parts\\" dxfname) "FILEDIA" "1")
CAD Developer
  • 1,532
  • 2
  • 21
  • 27