PDA

View Full Version : Run Lisp Routine on DWG and Xrefs


caduzer
2006-11-21, 09:38 PM
I've written the following AutoLisp script to run purge, audit and superpurge (3rd party program) on a file.

(defun C:check ()
(setvar "cmdecho" 0)
(command "spurgeall")
(command "-purge" "a" "*" "n")
(command "audit" "y")
(setvar "cmdecho" 1)
(princ)
)

It works fine, but I'd like to be able to run this file on the current drawing file as well as on all xreffed files.

Any ideas?

Scott

[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]

T.Willey
2006-11-22, 06:41 PM
If you want it to run on the xrefs that are in the drawing, you are not going to be able to do it with the code you have. You will either have to use ObjectDBX with ActiveX controls, or you will have to write a script file to open the xref drawings and run your lisp command.