I am attempting to create a export command for our surveyors that deletes all there point layers and seal layer, then audits and saves the file before opening the etransmit command. I only have a basic understainding of AutoLISP and have not found a book on the subject. Please help.
Below is what I currently have.I know there is a better way to do this, but it is above my programing skill right now.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; SURVey export (defun C:SRVY () (command "-laydel" ; Delete Survey data "Name" "F0" "Name" "F1" "Name" "F2" "Name" "F3" "Name" "F4" "Name" "F5" "Name" "F6" "Name" "F7" "Name" "F8" "Name" "F9" "Name" "F10" "Name" "F11" "Name" "F99" "Name" "SHEET-SEAL" ENTER "YES" ) (command ".audit" "y") ; Audits file (command "_qsave") ; Save changes (command "-etransmit" "Choose Setup" "ACAD2010" "Create transmittal package" ) (princ) )
Thanks in advance.
Hi,
take a look at these corrections:
(defun C:SRVY () (command "._laydel" ; Delete Survey data "Name" "F0" "Name" "F1" "Name" "F2" "Name" "F3" "Name" "F4" "Name" "F5" "Name" "F6" "Name" "F7" "Name" "F8" "Name" "F9" "Name" "F10" "Name" "F11" "Name" "F99" "Name" "SHEET-SEAL" "" "YES" ) (command "._audit" "y") ; Audits file (command "._qsave") ; Save changes (command "._etransmit" "Choose Setup" "ACAD2010" "Create transmittal package" (getvar "dwgname")) (princ) )
in the call to (command "LAYDEL") an ENTER is not a reserved word/variable that known to AutoLISP
instead A null string ("") is equivalent to pressing ENTER on keyboard.
in the call to (command "ETRANSMIT") a transmital setup ACAD2010 must exist in every dwg that is
opened otherwise the SRVY command will fail.
also take in consideration that SRVY may fail if AUDIT is not complete or some errors
will raise in the etransmit process.
Moshe
Can't find what you're looking for? Ask the community or share your knowledge.