ChrisCMU Posted January 19, 2012 Posted January 19, 2012 I am creating a script file (since lisps won't run once you close a drawing) to detach images on many drawings. I am trying to test the code right now, but for some reason AutoCAD tells me I have no xref's even though I do. If I have the Xref window open, it lists the image in there (and says "loaded"). It has the full path and everything. I can turn the layer on and see the image as well. But, if I access the command through the prompt (-xref), hit "?" and enter to list them all...it shows nothing in the list. How can it be shown one place but not another? It makes it impossible to batch because the script dies when it cannot find the image (even though it is loaded). please help. Quote
Lee Mac Posted January 19, 2012 Posted January 19, 2012 Whenever I use scripts to operate on multiple drawings, I always follow the same route: Use the script to merely Open / Load & Run LISP / Save / Close a drawing. This way you have the power and error trapping that LISP provides, but the ability to batch the operation using a script. Detaching images is relatively easy using Visual LISP, example here. Lee Quote
ChrisCMU Posted January 20, 2012 Author Posted January 20, 2012 Thanks, I will test that out. If I call a lisp in a script it would never execute the rest of the script. Like if I did "Open drawing1.dwg (LispName) Close"...it would never get to the close. How do you get it to resume the script after the lisp completes? Quote
Lee Mac Posted January 20, 2012 Posted January 20, 2012 I hvaen't noticed any problems with the script not resuming - are you certain that the LISP is loaded before it is evaluated? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.