hi,
i prepared this lisp that permit to do:
- export all layout in pdf and save in the same folder of the dwg
- zoom extension
- purge
- save
- close file
but the export command works only if autocad is setting in english doesn't care of the "_"
someone can help/explain what i'm missing?
;;zoom extension, purge, save all layout in pdf, save file, close
(Defun C:zpq+ ()
(setvar "cmddia" 0)
(setvar "filedia" 0)
;;salva pdf di tutti i layout nella cartella dove è salvato il dwg
;;save all layout in pdf
(setq namedwg (getvar "dwgname"))
(setq len (strlen namedwg))
(setq pdfname (substr namedwg 1 (- len 4)))
(setq dwgpath (findfile namedwg))
(setq pdfpath (strcat (vl-filename-directory dwgpath)"\\" pdfname ".pdf"))
(command "_-layout" "S" "")
(command "_-export" "P" "A" pdfpath )
;;pulisce il disegno
;;purge all
(command "_-purge" "a" "*" "n" "-purge" "z" "-_+purge" "r" "*" "n" "audit" "y" "-_purge" "a" "*" "n")
;;zoom estensioni
;;zoom extension
(command "_zoom" "e")
; ;salva
;;save
(command "_qsave")
(setvar "cmddia" 1)
(setvar "filedia" 1)
;;chiude il file
;;close
(command "_close")
(princ)
)