Based on the dwg that was attached, here is modified version from a AfraLISP.net example.
bb : dialog { //dialog name
label = "Box Insert"; //dialog label
spacer;
: list_box { //list box
label = "&Select Size:"; //list box label
key = "selections"; //key to list
height = 8; //height
allow_accept = true ; //allow double clicking
} //end list_box
spacer;
ok_cancel ; //OK and Cancel Buttons
}
(defun C:BB (/)
(setvar 'cmdecho 0)
(setq NAMES '("50x50" "60x60" "70x70"))
(setq dialogshow T) ;set flag
(setq dcl_id (load_dialog "bb.dcl")) ;initialise dialog box
(if (not ;check dcl exists
(new_dialog "bb" dcl_id) ;load into memory
);not
(setq dialogshow nil) ;if not exit
);if
(if dialogshow ;if dialog
(progn ;continue with programme
(start_list "selections") ;start list box
(mapcar 'add_list NAMES) ;add names from list
(end_list) ;end list box
(action_tile
"cancel" ;if cancel selected
"(done_dialog) (setq userclick1 nil)" ;close dialog, set flag
);action tile
(action_tile
"accept" ;if OK or double click
(strcat
"(progn (setq SIZA (atof (get_tile \"selections\")))" ;get size of box
"(done_dialog) (setq userclick1 T))" ;close dialog and set flag
);strcat
);action tile
(start_dialog) ;display dialog
(unload_dialog dcl_id) ;unload dialog
(if userclick1 ;if OK or double click
(progn ;continue with programme
(setq SIZA (fix SIZA)) ;convert index to integer
(setq BXSZ ;block size name
(cond
((= siza 0) "50") ;index no. 0 block name 50
((= siza 1) "60") ;index no. 1 block name 60
((= siza 2) "70") ;index no. 2 block name 70
)
)
(command "-INSERT" BXSZ pause "" "" "")
);progn
);if userclick1
);progn
);if dialogshow
(princ)
)