- (defun C:ABC (/ A B LHY S_D DCL_ID LHY LST)
- (setq LHY '("Steel" "Concrete" "Wood" "Plastic"))
- (if (< (setq DCL_ID (load_dialog "abc")) 0)
- exit
- )
- (if (not (new_dialog "abc" DCL_ID))
- exit
- )
- (start_list "lb1")
- (mapcar 'add_list LHY)
- (end_list)
- (action_tile "lb1" "(setq b $value)")
- (setq S_D (start_dialog))
- (unload_dialog DCL_ID)
- (if (and (= S_D 1) B)
- (foreach ENT (read (strcat "(" B ")"))
- (setq LST (append LST (list (nth ENT LHY))))
- )
- )
- LST
- ) ;|
- abc : dialog { //dialog name
- label = "multiple_select" ; //give it a label
- : list_box { //define list box
- key = "lb1"; //give it a name
- //list = "Steel\nConcrete\nWood\nPlastic";//the list
- height = 5; //give it a height
- width = 10; //give it a width
- fixed_width = true; //fix the width
- fixed_height = true; //fix the height
- alignment = centered; //center it
- multiple_select = true; //allow multiple select
- } //end list box
- spacer ; //add a space
- ok_cancel ; //predefined OK/Cancel button
- } //end dialog |;
|