TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Visual DCL Programming => Topic started by: fabcad on November 27, 2017, 02:56:51 PM

Title: Improvement of Lee Mac "ListBoxFunctionsV1-1.lsp" function
Post by: fabcad on November 27, 2017, 02:56:51 PM
Hello,

I would like to use the "ListBoxFunctionsV1-1.lsp" function, created by genius Lee Mac, I would like to recover at the end of the function two lists :
The first : full list sorted.
The second : list with only the choice of the user.

Thank you in advance,

In the example of the screenshot:
Full list sorted : ("Item 8" "Item 9" "Item 0" "Item 1" "Item 2" "Item 3" "Item 4" "Item 5" "Item 6" "Item 7")
List with only the choice of the user : ("Item 8" "Item 9")
Title: Re: Improvement of Lee Mac "ListBoxFunctionsV1-1.lsp" function
Post by: ronjonp on November 27, 2017, 03:39:58 PM
If you're using Lee's example program here (http://www.lee-mac.com/listboxfunctions.html), just add something like this to the end.
Code - Auto/Visual Lisp: [Select]
  1. (list lst (mapcar '(lambda (x) (nth x lst)) idx))