Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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?

Posted

I hvaen't noticed any problems with the script not resuming - are you certain that the LISP is loaded before it is evaluated?

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...