AutoCAD Mechanical Forum
Welcome to Autodesk’s AutoCAD Mechanical Forums. Share your knowledge, ask questions, and explore popular AutoCAD Mechanical topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AMSCRIPT to batch a Vault check-in.

1 REPLY 1
SOLVED
Reply
Message 1 of 2
awatt
797 Views, 1 Reply

AMSCRIPT to batch a Vault check-in.

I'm using Autocad Mechanical 2013 and Autodesk Vault Pro 2013.

 

I have a bunch of .dwg's without visualization files.

 

the 'update visualization file' always returns an 'unknown publishing error'.  So I'm trying to write a script with the AMSCRIPT generator and a custom lisp.

 

After checking in the first file (successfully, apparently), I consistently get a fatal error.  I don't see any evidence that the script made it to the next file.

Here's my code:

 

(DEFUN Test701upd1 (/)
(COMMAND-S "_PURGE" "B" "*" "N")
(COMMAND-S "_ZOOM" "E")
(COMMAND "QSAVE")
(IF (> (LENGTH (LAYOUTLIST)) 1)
(COMMAND "-VLTCHECKIN" "L" "Y" "L" "")
(COMMAND "-VLTCHECKIN" "L" "Y" "M" "")
)
)

 

And the script:

_.redraw
(load "C:/Users/awatt/Documents/Test701upd1.lsp")
(if Test701upd1-start (Test701upd1-start))
_open
"C:/Vault Workspace/Engineering/701/701-007000/701-7483.dwg"
_.redraw
(load "C:/Users/awatt/Documents/Test701upd1.lsp")
(Test701upd1)
(command "_.point" (getvar "limmin"))
(command "_.erase" (entlast)  "")
_.close
_y
_open
"C:/Vault Workspace/Engineering/701/701-007000/701-7484.dwg"
_.redraw
(load "C:/Users/awatt/Documents/Test701upd1.lsp")
(Test701upd1)
(command "_.point" (getvar "limmin"))
(command "_.erase" (entlast)  "")
_.close
_y
_open
"C:/Vault Workspace/Engineering/701/701-007000/701-7488.dwg"
_.redraw
(load "C:/Users/awatt/Documents/Test701upd1.lsp")
(if Test701upd1-last (Test701upd1-last) (Test701upd1))
(command "_.point" (getvar "limmin"))
(command "_.erase" (entlast)  "")
_.close
_y

 

 

 

1 REPLY 1
Message 2 of 2
awatt
in reply to: awatt

Thanks to Wayne Brill for the e-mail answer.  Next time I'll try the prompt suppression.

 

I found another work-around that got the job done.  I added a COMMAND "CLOSE" to my lisp, and used MS Word to take the save and close sequence out of the script via the 'replace all' tool.  That worked for about 99% of my files (literally thousands), though variations would stop the script.  But a RESUME kept it moving along, and the few leftovers were easily cleaned up manually.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost