Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Valued Mentor
2,345 Posts
9 Kudos
Registered: ‎11-18-2003
Post 1 of 4

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

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

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

Distinguished Mentor
787 Posts
80 Kudos
Registered: ‎02-25-2013
Post 2 of 4

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


AutoCAD® 2014, and Civil 3D® 2014 Certified Professional ~ Autodesk® Authorized Developer

Valued Mentor
2,345 Posts
9 Kudos
Registered: ‎11-18-2003
Post 3 of 4

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*
5,763 Posts
504 Kudos
Registered: ‎10-12-2006
Post 4 of 4

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.


Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!