Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

vl-remove question

2 REPLIES 2
Reply
Message 1 of 3
kdoug
194 Views, 2 Replies

vl-remove question

Hey everyone,
Well of course after several semesters of school, I've forgotten everything I've learn about AutoLISP in my spare time, lol. Guess I am getting old. Here's my list.

(("A" "B" "C" "D")("A" "B" "B" "D")("A" "B" "C" "C")("A" "B" "C" "C"))

Actually the real list is really long. Anyway I want to remove any list with "C" in the third position. I know that there is probably a ton of ways to deal with this situation, but how can I accomplish this with vl-remove? Thanks alot!

Kdoug
2 REPLIES 2
Message 2 of 3
_gile
in reply to: kdoug

Hi,

You can use vl-remove-if function

(vl-remove-if '(lambda (x) (= (caddr x) "C")) lst)


Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 3
kdoug
in reply to: kdoug

Thanks gile! Works great.

Kdoug

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost