Etransmit Batch Lisp 2014

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
so you know how if you have several drawings you are wanting to etransmit but don't want to open/run/save/close 100 times? I dont know much about Lisp's and have started working on a lisp that would automate this process. I am stuck and need some expert advice on what I have done wrong as its running through the lisp but its not actually saving out the zip file... when i input on the command line, qsave/-etransmit/CHoose/"SetupName"/Create/return, it works perfectly but when i run it through VLisp its giving me trouble. Please can anyone help me to understand what I'm doing wrong?
(defun C:BTRANSMIT ()
(vl-load-com)
(setq dwg (vl-filename-base (getvar "DWGNAME"))
path "YourFolderPathHere" ;input the path where you want your zip file saved
)
(if (not (vl-file-directory-p path))
(vl-mkdir path)
)
(if (setq fn (findfile (strcat path dwg ".DWG")))
(vl-file-delete fn)
)
(command "._qsave"
)
(if (setq fn (findfile (strcat path dwg ".ZIP")))
(vl-file-delete fn)
)
(command ".-ETransmit"
"_CH"
"SetupName" ;change SetupName to your SetupName
"_C"
(strcat (getvar "dwgprefix")
(vl-filename-base (getvar "dwgname"))
".zip"
)
)
(princ)
)