I update to this but give me this error
Code:
Error: An error has occurred inside the *error* function too many arguments
Code:
(DEFUN
PI:GETFILEFORMAT (/ )
(defun *error* ( / *error* dch dcl des)
(if (and (= 'int (type dch)) (< 0 dch))
(unload_dialog dch)
)
(if (= 'file (type des))
(close des)
)
(if (and (= 'str (type dcl)) (findfile dcl))
(vl-file-delete dcl)
)
(princ)
) ; end defun
(cond
( (not
(setq dcl (vl-filename-mktemp nil nil ".dcl")
des (open dcl "w")
) ; end setq
) ; end not
(princ "\nUnable to open DCL for writing.")
)
( (progn
(foreach str '(
"ed : edit_box { alignment = left; width = 20; edit_width = 10; fixed_width = true;}"
""
"pointsin : dialog { spacer; key = \"dcl\";"
" : boxed_column { label = \"Text Style\"; height = 1.0;}"
" : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
" key = \"radio_button01\"; label = \"1. PNEZD (comma delimited)\";"
" }" ; radio_button
" : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
" key = \"radio_button02\"; label = \"2. PNEZD (tab delimited)\";"
" }" ; radio_button
" : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
" key = \"radio_button03\"; label = \"3.PNEZD (white-space delimited)\";"
" }" ; radio_button
" : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
" key = \"radio_button04\"; label = \"4. PENZD (comma delimited)\";"
" }" ; radio_button
" : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
" key = \"radio_button05\"; label = \"5. PENZD (tab delimited)\";"
" }" ; radio_button
" : radio_button { height = 1.0; width = 20; is_tab_stop = true;"
" key = \"radio_button06\"; label = \"6. PENZD (white-space delimited)\";"
" }" ; radio_button
" : row { width = 20;"
" : button { key = \"OK\"; label = \"OK\"; is_default = true;"
" is_cancel = true; fixed_width = true; width = 10; }"
" }" ; end row
" }" ; end dialog
) ;end list
(write-line str des)
) ; end foreach
(setq des (close des)
dch (load_dialog dcl)
) ; end setq
(<= dch 0)
)
(princ "\nUnable to load DCL file.")
)
( (not (new_dialog "pointsin" dch))
(princ "\nUnable to display 'pointsin' dialog.")
)
( t
(set_tile "dcl" "Select file")
(setq sngReturn 1)
(action_tile "radio_button01" "(setq sngReturn 1))")
(action_tile "radio_button02" "(setq sngReturn 2))")
(action_tile "radio_button03" "(setq sngReturn 3))")
(action_tile "radio_button04" "(setq sngReturn 4))")
(action_tile "radio_button05" "(setq sngReturn 5))")
(action_tile "radio_button06" "(setq sngReturn 6))")
(action_tile "OK" "(progn (done_dialog 1) sngReturn)")
(start_dialog)
)
) ; end cond
(*error* nil)
(princ)
) ;_ end defun
Thanks