JuniorNogueira Posted May 23, 2019 Posted May 23, 2019 I'm trying to create a .dcl with a listbox with all my blocks, how to store the ITEM NAME in a variable? (action_tile "accept" "(setq nameitem $value)") _$ "1" How to get the ITEM name? _$ "Block 01" Quote
ronjonp Posted May 23, 2019 Posted May 23, 2019 (edited) Use NTH with your list of blocks. Something like this .. will work for multiple select too: (defun _getlistboxselection (lst sel) (mapcar '(lambda (x) (nth x lst)) (read (strcat "(" sel ")"))) ) (_getlistboxselection '("My" "Items" "In" "A" "List") "0 2 4") Edited May 23, 2019 by ronjonp 1 Quote
JuniorNogueira Posted May 23, 2019 Author Posted May 23, 2019 (edited) Thank you!! @ronjonp Very good!! Edited May 23, 2019 by JuniorNogueira Quote
Lee Mac Posted May 25, 2019 Posted May 25, 2019 (edited) If you are only looking to present the user with a single List Box as an interface, below are two ready-made functions that you may wish to call from your program: List Box List Box with Filter Or at least, you could look at the code to see how the selections are handled - essentially the same technique as @ronjonp Hope this helps! Edited May 25, 2019 by Lee Mac Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.