lavekkia Posted April 30, 2013 Posted April 30, 2013 (edited) Hello to everyone, could someone explain me why this piece of code (defun provablk ( / ) (command "_regen") (command "_regen") ) crash AutoCAD ?!?!? The same code works is called from command line but hangs AutoCAD when called via action_tile; it seems that the command called is not relevant I have discovered that commenting out the second line but calling twice the function also hangs AutoCAD. I have defined a custom error handler but it seems to have no effect I have AutoCAD 2012, no service pack Thanks in advance Alessandro Damiani Edited April 30, 2013 by lavekkia Quote
lavekkia Posted April 30, 2013 Author Posted April 30, 2013 I have found the reason: http://softdraft.info/autolisp/command-function/ according to this page, when called inside a dialog box, the (command ".....") is left pending (see the bottom of the page). I ll try to experiment a bit, but i think i have found a solution. I hope this helps anyone having this problem. Best regards, Alessandro Damiani Quote
MSasu Posted April 30, 2013 Posted April 30, 2013 As you already found, the DCL dialogs were modal, so you cannot use AutoCAD commands that interact with the screen while DCL form is active. For modeless dialogs you may want to take a look to OpenDCL tool. Or, as workaround, hide temporary the DCL form while do the action on screen and restore it right after. Quote
Recommended Posts
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.