
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a lisp and dcl that i am trying to create that will allow users to pick a button from the dcl and load the function associated with the button. The lisp will run is i run it without the dcl, but when i run it with the dcl the lisp locks up on selecting the objects. i need to to select the butoon and continue with the lisp function. Below is my sample code for the dcl and the lisp.
DCL...
CSASTATUS : dialog {
label = "Udate CSA Ojects Per Status Colors";
label = "CSA Status Updates";
: button {
key = "but1";
label = "&Prelim";
is_default = false;
alignment = centered;
fixed_width = false;
}
: button {
key = "but2";
label = "&Engineering";
is_default = false;
alignment = centered;
fixed_width = false;
}
: button {
key = "but3";
label = "&IFC";
is_default = false;
alignment = centered;
fixed_width = false;
}
: button {
key = "cancel";
label = "&Close";
alignment = centered;
is_default = true;
is_cancel = true;
fixed_width = true;
}
} //end : dialog
Lisp...
(prompt "\nType CCC to run...")
(defun *error* (msg) (princ "error: ") (princ msg) (princ))
(defun c:ccc ();define the function
(setq dcl_id (load_dialog "CSASTATUS.dcl"));load the DCL file
(if (not (new_dialog "CSASTATUS" dcl_id));load the dialogue box
(exit );if not loaded exit
)
(action_tile "but1" "(doButton 1)");action_tile
(action_tile "cancel" "(done_dialog)")
(start_dialog)
(unload_dialog dcl_id)
(princ)
);defun
(princ)
(defun doButton(a)
(cond
((= a 1) (Prelim))
((= a 2) (Eng))
)
)
(defun c:Prelim (/ PICKS SS1)
(vl-load-com)
(setq PICKS (getvar "pickstyle"))
(setvar "pickstyle" 0)
(command "-layer" "s" "0" "f" "CL" "")
(princ "\nSelect objects to change color: ")
(setq SS1 (ssget))
(command "_.CHANGE" SS1 "" "_properties" "_LAYER" "COL" "")
(command "-layer" "s" "0" "t" "CL" "")
(setvar "pickstyle" 1)
)
Solved! Go to Solution.