I'm making a DCL/LISP routine that lets you pick by way of toggle boxes which plot output(s) you want. We have 4: 24x36, 11x17, PDF, PLOT FILE. I have made the DCL file, and most of the LISP. It all works fine, no problem...but what I want to do now is take the choices made (from the toggles) and bring it to a confirm dialog that would show the choices made and have the "Yes/No/Cancel" buttons. If "Yes" is selected, then execute the commands to make the plots. If "No" is selected, then bring back to previous dialog to change output setting. If "Cancel" is slelected, end the program. A little direction I guess is all that is needed, for now.
I have changed the plot command to line commands in case anyone wanted to run it for testing. I would upload them to the Lilly Pond...but no password
LISP CODE
;;***********************************************
;; MPlot.lsp
;; Created by Dominic Cesare
;; 08/30/2004
;;***********************************************
;;**********************
;;Start of Routine
;;**********************
;informs user how to run lisp
(prompt "\nType MPLOT to run.....")
;define function
(defun c:MPLOT (/ dcl_id 11x17 24x36 PDF PLOT)
;load dialog
(setq dcl_id (load_dialog "MPLOT.dcl"))
;test for dialog
(if (not (new_dialog "main" dcl_id)
);not
;exit if no dialog
(exit)
)
(action_tile "tog1" "(setq 11x17 $value)")
(action_tile "tog2" "(setq 24x36 $value)")
(action_tile "tog3" "(setq PDF $value)")
(action_tile "tog4" "(setq PLOT $value)")
;cancel button
(action_tile
;if cancel button is pressed
"cancel"
;close dialog, set flag
"(done_dialog) (setq userclick nil)"
);end action_tile Cancel
;O.K. button
(action_tile
;if O.K. is pressed
"accept"
;close dialog, set flag
"(done_dialog) (setq userclick T))"
);end action_tile O.K.
;start dialog
(start_dialog)
;unload
(unload_dialog dcl_id)
(if userclick
(progn
(if(= 11x17 1)(command "line" "0,0" "50,0" ""))
(if(= 24x36 1)(command "line" "0,20" "50,0" ""))
(if(= PDF 1)(command "line" "0,40" "50,0" ""))
(if(= PLOT 1)(command "line" "0,60" "50,0" ""))
);progn
;not
(alert "No output selected")
);if
(princ)
);defun
;;**********************
;;End of Routine
;;**********************
DCL CODE:
//***********************************************
// MPlot.DCL
// Created by Dominic Cesare
// 08/30/2004
//***********************************************
//**********************
//Start of Dialog
//**********************
main : dialog {
label = "Multiple Plot Configuration";
: boxed_radio_row {
label = "Select necessary output media:";
: toggle {
key = "tg1";
label = "11x17";
action = "(setq 11x17 1)";
}
: toggle {
key = "tg2";
label = "24x36";
action = "(setq 24x36 1)";
}
: toggle {
key = "tg3";
label = "PDF File";
action = "(setq PDF 1)";
}
: toggle {
key = "tg4";
label = "Plot File";
action = "(setq PLOT 1)";
}
}
: row {
: paragraph {
: text_part {
label = "Dominic Cesare";
}
: text_part {
label = "08.27.2004";
}
}
ok_cancel;
}
}
//**********************
//End of Dialog
//**********************