nila_joy Posted March 18, 2012 Posted March 18, 2012 HI all, I am facing a new type of problem, I can understand the problem, but don't know how to solve it... This is a part of a big program , which have many nesting dialog boxes, so many user inputs.. if I give all user inputs and press "OK" button, its working fine .. but if I press "cancel" button middle of the program, its getting hanged.. I want it like this .. 1. if i press "OK" button without all users input, it will show "Data insufficient" and terminate all. 2. if i press "Cancel" button middle of the program, it'll terminate all and will back in to command line. Plz help.. (action_tile "conv" "(done_dialog 4)") (action_tile "dp" "(done_dialog 5)") (action_tile "beam_1" "(done_dialog 7)") (action_tile "beam_2" "(done_dialog 8)") (action_tile "dir" "(done_dialog 6)") [color=red] (action_tile "ok" "(saveVers)(done_dialog 1)") (action_tile "cancel" "(done_dialog)"[/color]) (action_tile "stool_start" "(stool_function)") Regards, Subho .. India Quote
pBe Posted March 18, 2012 Posted March 18, 2012 First thing to do. Read If you provide a callback for the button whose key is "accept" or "cancel" (usually the OK and Cancel buttons), the callback must call done_dialog explicitly. If it doesn't, the user can be trapped in the dialog box. If you don't provide an explicit callback for these buttons and use the standard exit buttons, AutoCAD handles them automatically. Also, an explicit AutoLISP action for the “accept” button must specify a status of 1 (or an application-defined value); otherwise, start_dialog returns the default value, 0, which makes it appear as if the dialog box was canceled. 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.