attached is some code for a lisp routine used in conjunction wiht a dcl file. i am trying to get the buttons to call a lisp routine for each radio button. a1, a2, e1 etc are the lisp commands. when i click the accept button i get a no function defined error. any ideas?
(defun c:FD()
;(defun saveVars()
; (setq but1(atoi(get_tile "choice1")))
; (setq but2(atoi(get_tile "choice2")))
; (setq but3(atoi(get_tile "choice3")))
; (setq but4(atoi(get_tile "choice4")))
; (setq but5(atoi(get_tile "choice5")))
; (setq but6(atoi(get_tile "choice6")))
; (setq but7(atoi(get_tile "choice7")))
; (setq but8(atoi(get_tile "choice8")))
; (setq but9(atoi(get_tile "choice9")))
; (setq but10(atoi(get_tile "choice10")))
; )
;
; (action_tile "choice1" "(setq A1)(done_dialog)")
; (action_tile "choice2" "(setq A2)(done_dialog)")
; (action_tile "choice3" "(setq F1)(done_dialog)")
; (action_tile "choice4" "(setq E1)(done_dialog)")
; (action_tile "choice5" "(setq E2)(done_dialog)")
; (action_tile "choice6" "(setq E3)(done_dialog)")
; (action_tile "choice7" "(setq M1)(done_dialog)")
; (action_tile "choice8" "(setq P1)(done_dialog)")
; (action_tile "choice9" "(setq P2)(done_dialog)")
; (action_tile "choice10" "(setq P3)(done_dialog)")
;
(setq dcl_id (load_dialog "dbcleanup.dcl"))
(if (not (new_dialog "dbcleanup" dcl_id) )(exit))
(action_tile "accept" "(setq ddiag 1)(saveVars)(done_dialog)")
(action_tile "cancel" "(setq ddiag 0)(done_dialog)")
(start_dialog)
(unload_dialog dcl_id)
(if (= ddiag 0)
(princ "\n ...DBCleanup has been cancelled!")
)
; (if(= ddiag 1)
; (progn
; (princ "\n ...Processing -- please wait...")
; )
; (cond
; ((=choice1 1)(command "A1")
; ((=choice2 1)(command "A2")
; ((=choice3 1)(command "F1")
; ((=choice1 1)(command "E1")
; ((=choice1 1)(command "E2")
; ((=choice1 1)(command "E3")
; ((=choice1 1)(command "M1")
; ((=choice1 1)(command "P1")
; ((=choice1 1)(command "P2")
; ((=choice1 1)(command "P3")
; )
;
(princ)
)
(setq mySlideName "C:/Acad/Mayo.sld")
(setq myKey "sld")
(defun upDateImage (sldName key)
(upDateImage mySlideName myKey)
(setq width (dimx_tile key))
(setq height (dimy_tile key))
(start_image key)
(fill_image 0 0 width height 0)
(slide_image 0 0 width height sldName)
(end_image)
)
(princ "\n DBCLEANUP loaded! Type A1, A2, F1, E1, E2, E3, M1, P1, P2 or P3 to start!")
(princ)
(defun c:FD()
;(defun saveVars()
; (setq but1(atoi(get_tile "choice1")))
; (setq but2(atoi(get_tile "choice2")))
; (setq but3(atoi(get_tile "choice3")))
; (setq but4(atoi(get_tile "choice4")))
; (setq but5(atoi(get_tile "choice5")))
; (setq but6(atoi(get_tile "choice6")))
; (setq but7(atoi(get_tile "choice7")))
; (setq but8(atoi(get_tile "choice8")))
; (setq but9(atoi(get_tile "choice9")))
; (setq but10(atoi(get_tile "choice10")))
; )
;
; (action_tile "choice1" "(setq A1)(done_dialog)")
; (action_tile "choice2" "(setq A2)(done_dialog)")
; (action_tile "choice3" "(setq F1)(done_dialog)")
; (action_tile "choice4" "(setq E1)(done_dialog)")
; (action_tile "choice5" "(setq E2)(done_dialog)")
; (action_tile "choice6" "(setq E3)(done_dialog)")
; (action_tile "choice7" "(setq M1)(done_dialog)")
; (action_tile "choice8" "(setq P1)(done_dialog)")
; (action_tile "choice9" "(setq P2)(done_dialog)")
; (action_tile "choice10" "(setq P3)(done_dialog)")
;
(setq dcl_id (load_dialog "dbcleanup.dcl"))
(if (not (new_dialog "dbcleanup" dcl_id) )(exit))
(action_tile "accept" "(setq ddiag 1)(saveVars)(done_dialog)")
(action_tile "cancel" "(setq ddiag 0)(done_dialog)")
(start_dialog)
(unload_dialog dcl_id)
(if (= ddiag 0)
(princ "\n ...DBCleanup has been cancelled!")
)
; (if(= ddiag 1)
; (progn
; (princ "\n ...Processing -- please wait...")
; )
; (cond
; ((=choice1 1)(command "A1")
; ((=choice2 1)(command "A2")
; ((=choice3 1)(command "F1")
; ((=choice1 1)(command "E1")
; ((=choice1 1)(command "E2")
; ((=choice1 1)(command "E3")
; ((=choice1 1)(command "M1")
; ((=choice1 1)(command "P1")
; ((=choice1 1)(command "P2")
; ((=choice1 1)(command "P3")
; )
;
(princ)
)
(setq mySlideName "C:/Acad/Mayo.sld")
(setq myKey "sld")
(defun upDateImage (sldName key)
(upDateImage mySlideName myKey)
(setq width (dimx_tile key))
(setq height (dimy_tile key))
(start_image key)
(fill_image 0 0 width height 0)
(slide_image 0 0 width height sldName)
(end_image)
)
(princ "\n DBCLEANUP loaded! Type A1, A2, F1, E1, E2, E3, M1, P1, P2 or P3 to start!")
(princ)