Visual LISP, AutoLISP and General Customization

Valued Mentor
Posts: 2,283
Registered: ‎11-18-2003
Message 1 of 5 (252 Views)

Pausing a script... Used to be that....

252 Views, 4 Replies
04-25-2013 08:42 AM

I been using AutoCAD for quite some time now...

It Used to be, perhaps even back to release 9 dos that I would use a script to iterate through several dozen drawings. Most times I did this to simply check through the drawings to see that I made necessary edits. To do this, I simply went to a dos prompt and piped the drawing names with path info to an ASCII file. Then I'd edit the file and quickly add appropriate 'open' and 'save' commands before and after every drawing.


To get the script to pause which allowed me to check (and edit) I could include a semi colon ';' ... at the time, this was not a comment as it is now, but an unknown command. When autocad would through throw up an 'Unknown Command' notice and effectively pause the script... I'd make the necessary edits, then issue 'Resume' command which would run through the script where it had stopped. Now however the semi colon is a comment.


I did simply try just now what I knew was an unknown command... this seems to work.


I wonder now if there is not a better way?

Active Contributor
Posts: 44
Registered: ‎02-02-2012
Message 2 of 5 (240 Views)

Re: Pausing a script... Used to be that....

04-25-2013 10:24 AM in reply to: mdhutchinson

You would need to send a "backspace" key to make it pause.



 Thats in VBS though so I'm not sure it will help...I'm still learning myself but if you're experianced maybe you'll know how to apply that.

Distinguished Contributor
Posts: 213
Registered: ‎04-01-2008
Message 3 of 5 (228 Views)

Re: Pausing a script... Used to be that....

04-25-2013 12:46 PM in reply to: mdhutchinson

that is exactly what i have done for years too, although i use a little old visual basic script generator. i used the command "pause" which is not a command at all and a pgp shortcut for "Resume".


there is a great program called ScriptPro and this is exactly the feature i requested they add and they said we will look at it.  if ScriptPro encounters an error it just moves right along so its worthless for this task of reviewing drawings and making small changes.


the short answer is that i dont think there is a better way.



Posts: 164
Registered: ‎10-06-2010
Message 4 of 5 (167 Views)

Re: Pausing a script... Used to be that....

10-07-2013 03:45 PM in reply to: art_turner

I agree, this is a very useful feature of scripts. Two of the routines supplied with Multi-Batch are “Pause Script to Work on Drawing” and “Pause Script to Work on Drawing and Save”. We use the incorrect command -Type_Resume_to_continue- this pauses the routine and by typing Resume on the AutoCAD command line resumes the script and moves onto the next drawing.


Most of the time you can add more commands to the routine to prepare the drawing after opening, things like purge, change to paperspace and lock viewports then Pause the script to give the drawing a final check. Next type Resume and it will save the drawing and move onto the next drawing in the list. It is a very useful feature.



Distinguished Contributor
Posts: 213
Registered: ‎04-01-2008
Message 5 of 5 (146 Views)

Re: Pausing a script... Used to be that....

10-09-2013 09:38 AM in reply to: mdhutchinson

i will check it out. i built a zoom extents and save into my script too, so i can zoom around, stretch a dimension here or there, and just do my two letter RESUME alias to reset the view, save and bring up the next one.


this is the only thing preventing me from really using script-pro, missing one of the two main things i use a script generator for, the other is printing.   


i actually prefer a dumb little script generator that just creates a script text file parsed with all the file names i can drag and drop in drawing, over the script-pro total control method.


one of the things limiting script pro is that its hard to learn since it doesnt really use scripts, for instance it doesnt need open and close statements. they need more examples. its not that hard it just throws you at first since its different.












You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community