Not sure if this is the proper forum to post this question, but it's the best I could find:
I'm learning how to create dialog boxes (.dcl files) to run from lisp scripts, and I've been going through the tutorials at afralisp, and I have a few questions regarding nesting of dialog boxes...
1) When I have a button on the initial dialog box open a second box (i.e. "Next"), the first box doesn't disappear. I've tried adding (done_dialog) into the (action_tile... command, but that doesn't do anything. Also, I've read the "Hiding Dialog Boxes" tutorial at afralisp, but, from what I understand, that only temporarily hides a dialog box, not close it.
2) Will entering data in an edit_box on the first dialog box carry over to the second box? For instance, I have a series of 12 toggles in the first dialog, and if I select only one of them, will I be able to modify an is_enabled = false; command in the second box for the toggles I didn't select?
3) Is there a way to open/convert my current .dcl file to an .odcl file for OpenDCL to read so I can possibly design/modify my dialog boxes in OpenDCL without having to create it from scratch again?
I'm sure I have/will have more questions but these are the ones sticking out in my mind at the moment.
My .dcl file defining my dialog boxes. The second dialog box, buck2, is only a place holder for now.
Code:
dcl_settings : default_dcl_settings { audit_level = 0; }
buck : dialog {
label = "Buckeye Project Creator";
: boxed_column {
label = "Enter Project Information Below:";
:row {
: column {
: row {
:text {
label = "Terminal Name:";
}
: edit_box {
key = "tn";
width = 20;
fixed_width = true;
}
}
: row {
: text {
label = "Terminal Code:";
}
: edit_box {
key = "tc";
width = 10;
fixed_width = true;
}
}
: row {
: text {
label = "Project Number:";
}
: edit_box{
key = "po";
width = 10;
fixed_width = true;
}
}
: row {
: text {
label = "Project Name:";
}
: edit_box {
key = "pn";
width = 20;
fixed_width = true;
}
}
}
/////////////////////////////////////////////////////////////
: column {
label = "Lanes to Include:";
: row {
: column {
: toggle {
label = "Lane 1";
key = "ln1";
}
: toggle {
label = "Lane 2";
key = "ln2";
}
: toggle {
label = "Lane 3";
key = "ln3";
}
: toggle {
label = "Lane 4";
key = "ln4";
}
}
: column {
: toggle {
label = "Lane 5";
key = "ln5";
}
: toggle {
label = "Lane 6";
key = "ln6";
}
: toggle {
label = "Lane 7";
key = "ln7";
}
: toggle {
label = "Lane 8";
key = "ln8";
}
}
: column {
: toggle {
label = "Lane 9";
key = "ln9";
}
: toggle {
label = "Lane 10";
key = "ln10";
}
: toggle {
label = "Lane 11";
key = "ln11";
}
: toggle {
label = "Lane 12";
key = "ln12";
}
}
}
}
}
spacer;
spacer;
/////////////////////////////////////////////////////////////
: row {
label = "Drawing Number Information:";
: column {
: row {
: text {
label = "Cover Page (CO):";
}
: edit_box {
key = "co";
width = 2;
fixed_width = true;
}
}
: row {
: text {
label = "Conduit Diagrams (EI):";
}
: edit_box {
key = "ei";
width = 2;
fixed_width = true;
}
}
: row {
: text {
label = "Schematic Diagrams (SC):";
}
: edit_box {
key = "sc";
width = 2;
fixed_width = true;
}
}
: row {
: text {
label = "Fabrication Details (ED):";
}
: edit_box {
key = "ed";
width = 2;
fixed_width = true;
}
}
: row {
: text {
label = "Bill of Materials (EB):";
}
: edit_box {
key = "eb";
width = 2;
fixed_width = true;
}
}
: row {
: text {
label = "Reference Drawings (ER):";
}
: edit_box {
key = "er";
width = 2;
fixed_width = true;
}
}
}
: column {}
: column {}
: column {}
: column {}
}
}
/////////////////////////////////////////////////////////////
: row {
: button {
label = "Next";
key = "next";
width = 12;
fixed_width = true;
mnemonic = "N";
is_default = true;
}//end NEXT button
: button {
label = "Cancel";
key = "cancel";
width = 12;
fixed_width = true;
}//end CANCEL button
}//end ROW
}//end BUCKEYE DIALOG
/////////////////////////////////////////////////////////////
buck2 : dialog {
label = "Buckeye Project Creator";
: boxed_column{
label = "Enter Drawing Specifics Below:";
: boxed_column {
: boxed_column {
: boxed_column {
: boxed_column {
}
}
}
}
}
ok_cancel;
}
/////////////////////////////////////////////////////////////
The .lisp file I run in autocad to get the first box open, etc.
Code:
(defun c:buckproj (/)
(setq dcl_id (load_dialog "buckproj.dcl"))
(if (not (new_dialog "buck" dcl_id))
(exit)
)
(action_tile "cancel" "(done_dialog) (setq result nil)") ;; CANCEL button pressed
(action_tile "next"
; "(done_dialog) (setq result nil)
"(buck2)") ;; NEXT button pressed
(start_dialog)
(unload_dialog dcl_id)
(princ)
)
(defun buck2 ()
(setq dcl_id1 (load_dialog "buckproj.dcl"))
(if (not (new_dialog "buck2" dcl_id1))
(exit)
)
(action_tile "cancel" "(done_dialog) (setq result1 nil)")
(action_tile "accept" "(done_dialog) (setq result1 T)")
(start_dialog)
(unload_dialog dcl_id1)
(princ)
)