Hi
Dear friend. I see a DCL example at "web2.airmail.net" .
//---------------------------------------------------------------------------------------------------------
// MyYesNo
// Note: The width for the Text1 key was determined by the syntax example and
// will need to be changed as per your requirements. Also note that the buttons
// for Yes and No, the added fixed_width = true;.
//---------------------------------------------------------------------------------------------------------
MyYesNo : dialog {
key = "Title";
label = "";//Title$ from lsp file
spacer;
: text {
key = "Text1";
label = "";//Question$ from lsp file
width = 35.0;
alignment = centered;
}
spacer;
: row {
fixed_width = true;
alignment = centered;
: button {
key = "Yes";
label = "&Yes";
is_default = true;
width = 7.92;
fixed_width = true;
}
: button {
key = "No";
label = "&No";
is_cancel = true;
width = 7.92;
fixed_width = true;
}
}
}//MyYesNo
;----------------------------------------------------------------------------------------------------------
; MyYesNo - Question dialog with one question line
; Arguments: 2
; Title$ = Dialog Title
; Question$ = Question line
; Syntax: (MyYesNo " My Yes No" "Do you like creating programs in AutoLISP?")
;----------------------------------------------------------------------------------------------------------
(defun MyYesNo (Title$ Question$ / Answer$ Dcl_Id% Return#)
(princ "\nMyYesNo")(princ)
; Load Dialog
(setq Dcl_Id% (load_dialog "MyDialogs.dcl"))
(new_dialog "MyYesNo" Dcl_Id%)
; Set Dialog Initial Settings
(set_tile "Title" Title$)
(set_tile "Text1" Question$)
; Dialog Actions
(action_tile "Yes" "(done_dialog 1)")
(action_tile "No" "(done_dialog 0)")
(setq Return# (start_dialog))
; Unload Dialog
(unload_dialog Dcl_Id%)
(if (= Return# 1)
(setq Answer$ "Yes")
(setq Answer$ "No")
);if
(princ "\n")(princ Answer$)(princ);Optional
Answer$
);defun MyYesNo
usage:
(MyYesNo " My Yes No" "Do you like creating programs in AutoLISP?")
"My Yes No" is Title.
"Do you like creating programs in AutoLISP?" is message need to display. I want use a variable[ eg: (getvar "dwgprefix") ] in this message . How do it ?