Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Valued Mentor
mdhutchinson
Posts: 2,283
Registered: ‎11-18-2003
Message 1 of 4 (210 Views)

How can I automatically issue a 'Resume' command if the script fails?

210 Views, 3 Replies
11-15-2013 11:04 AM

How might I automate issuing 'RESUME' in a script if the script fails?

Distinguished Mentor
BlackBox_
Posts: 733
Registered: ‎02-25-2013
Message 2 of 4 (196 Views)

Re: How can I automatically issue a 'Resume' command if the script fails?

11-15-2013 12:08 PM in reply to: mdhutchinson

There's obviously a reason why the Script failed, so to programmatically 'resume' could put you in an endless loop.



"Potential has a shelf life." - Margaret Atwood


Autodesk Exchange Apps ~ Autoloader ~ AutoCAD Security

Valued Mentor
mdhutchinson
Posts: 2,283
Registered: ‎11-18-2003
Message 3 of 4 (186 Views)

Re: How can I automatically issue a 'Resume' command if the script fails?

11-15-2013 01:40 PM in reply to: BlackBox_

If the script has failed... then RESUME command would continue with the next line - INDEED... the next line after the line which failed. The whole point in scripts is so you can let it run - uninteripted - as well as not baby sat. This is a great place to use FileLogOn at the start of a script... so you can investigate the point of the failure.

 

capeesh?

*Expert Elite*
dgorsman
Posts: 5,043
Registered: ‎10-12-2006
Message 4 of 4 (175 Views)

Re: How can I automatically issue a 'Resume' command if the script fails?

11-15-2013 02:11 PM in reply to: mdhutchinson

Scripts have no user input or error handling, so if something fails bad things can happen.  The script could be continuing forward from a state where you expect it to work, but instead its issuing E;ALL;SAVE;CLOSE or simply firing off unknown options to one of the looping commands.

 

If you want more complex handling of error conditions, you will need to switch to something other than scripting.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


You are not logged in.

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

Announcements
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