I get the following error on loading this in Autocad 2000i, does anyone know why? ;AutoCAD menu utilities loaded. ;Command: appload ;EXAMPLE.LSP successfully loaded. ;Command: example ; error: quit / exit abort ;Command: example ; error: quit / exit abort
;--- EXAMPLE.lsp - Text Find (defun saveVars() ;;;--- Save the input from the dialog box (setq textVal (get_tile "textval")) ) (defun C:EXAMPLE() ;;;--- Load the dcl file (setq dcl_id (load_dialog "EXAMPLE.dcl"))
;;;--- Load the dialog definition if it is not already loaded (if (not (new_dialog "EXAMPLE" dcl_id) ) (exit))
;;;--- If an action event occurs, do this function (action_tile "cancel" "(setq ddiag 1)(done_dialog)") (action_tile "accept" "(setq ddiag 2)(saveVars)(done_dialog)")
;;;--- Display the dialog box (start_dialog)
;;;--- If the cancel button was pressed - display message (if (= ddiag 1) (princ "\n \n ...EXAMPLE Cancelled. \n ") )
;;;--- If the "Okay" button was pressed (if (= ddiag 2) (princ "\n \n ...Example Complete!") )
;;;--- Suppress the last echo for a clean exit (princ)
) ====DCL FILE NAMED EXAMPLE.DCL====== EXAMPLE : dialog { label = "EXAMPLE.lsp"; \\ Puts a label on the dialog box initial_focus = "textval"; \\ Sets the initial focus : column { : row { : boxed_column { : edit_box { \\ The edit_box control - Something new! key = "textval"; label = "Text Value to Find"; edit_width = 30; value = ""; } } } : row { : boxed_row { : button { key = "accept"; label = " Okay "; is_default = true; } : button { key = "cancel"; label = " Cancel "; is_default = false; is_cancel = true; } } } } }