Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Help with sorting lists and using "cons" to add multiple lists.
« previous
next »
Print
Pages:
1
[
2
]
All
|
Go Down
Author
Topic: Help with sorting lists and using "cons" to add multiple lists. (Read 8228 times)
0 Members and 1 Guest are viewing this topic.
ronjonp
Needs a day job
Posts: 7526
Re: Help with sorting lists and using "cons" to add multiple lists.
«
Reply #15 on:
January 18, 2019, 12:52:19 PM »
Glad to help
. Really you don't need all the pages if you use the vl-remove-if-not method. Here's a quick example:
Code - Auto/Visual Lisp:
[Select]
(
setq
i
0
)
;;(setq keep (mapcar 'itoa '(1 4 8 9 12 15)))
(
repeat
50
(
setq
pages
(
cons
(
setq
i
(
1+
i
)
)
pages
)
)
)
(
vl
-
remove
-
if
-
not
'
(
lambda
(
x
)
(
<=
12
x
25
)
)
(
reverse
pages
)
)
Logged
Windows 11 x64 - AutoCAD /C3D 2023
Custom Build PC
Print
Pages:
1
[
2
]
All
|
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
Help with sorting lists and using "cons" to add multiple lists.