Friday, August 8, 2008

Batch convert drawings to DXF 2000 format using SmartPurger

SmartPurger has support to run a script or AutoLISP file and here is a sample I showed a client how to do to save drawings to AutoCAD 2000 DXF file format. It can easily be change to save to other DXF versions like AutoCAD 2007 DXF, AutoCAD 2004 DXF or AutoCAD R12 DXF.

Here is the code for the Script file:

(command "._saveas" "_DXF" "_V" "_R2000" "" "")
(while (wcmatch (getvar "cmdnames") "*SAVEAS*")
  (command "_y")
)
(if (not (equal 0 (getvar "dbmod")))
  (progn
    (while (not (wcmatch (getvar "cmdnames") "*QUIT*"))
      (command "_.quit")
    )
    (while (wcmatch (getvar "cmdnames") "*QUIT*")
      (command "_y")
    )
  )
  (command "_.quit")
)

No comments:

Post a Comment