Interacting with the Dialog Box from AutoLISP Code

AutoCAD Visual LISP

 
Interacting with the Dialog Box from AutoLISP Code
 
 
 

You now need to program your AutoLISP function to interact with the dialog box. The stubbed-out function, gp:getDialogInput, is where this activity will take place. This function now lives in the gp-io.lsp file, which you earlier extracted from gpmain.lsp.

Developing a dialog box interface can be confusing the first few times you do it. It involves planning ahead and asking yourself such questions as:

  • Does the dialog box need to be set up with default values?
  • What happens when the user chooses a button or enters a value?
  • What happens when the user chooses Cancel?
  • If the dialog (.dcl) file is missing, what needs to occur?