ObjectARX

Reply
Contributor
drobison
Posts: 11
Registered: ‎03-28-2005
Message 1 of 3 (505 Views)
Accepted Solution

Prevent user from canceling LISP execution

505 Views, 2 Replies
08-30-2012 10:25 AM

Is there any way to lock AutoCAD to prevent the user from canceling the execution of a Lisp function? I have a long running Lisp function that I don't want the user to accidentally cancel (typically by running another command).

 

Right now, I have accomplished this by using a DCL dialog box. I use (new_dcl) to open the dialog, but don't call (start_dialog). When the function is finished, I call (term_dialog) to close it.

 

It works well, but the dialog flashing on the screen is annoying to some of my users and I was wondering if there was another way to accomplish this.

Preventing users from cancelling a long operation is generally frowned upon, but you have to disable the main window to prevent user interaction from occurreing. Better would be to either hide the AutoCAD window while the operation is running, or start a new hidden instance of AutoCAD and perform your operation in the hidden instance.

Distinguished Mentor
owenwengerd
Posts: 671
Registered: ‎08-06-2002
Message 2 of 3 (501 Views)

Re: Prevent user from canceling LISP execution

08-30-2012 01:54 PM in reply to: drobison

Preventing users from cancelling a long operation is generally frowned upon, but you have to disable the main window to prevent user interaction from occurreing. Better would be to either hide the AutoCAD window while the operation is running, or start a new hidden instance of AutoCAD and perform your operation in the hidden instance.

--
Owen Wengerd
ManuSoft
Contributor
drobison
Posts: 11
Registered: ‎03-28-2005
Message 3 of 3 (487 Views)

Re: Prevent user from canceling LISP execution

08-31-2012 08:20 AM in reply to: owenwengerd

Thanks for the suggestion--disabling the AutoCAD window itself appears to be working pretty well.

 

I know allowing them to cancel the operation would be best, but in this case, properly canceling would take longer than finishing.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!