Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Distinguished Contributor
kdoug
Posts: 175
Registered: ‎06-15-2005
Message 1 of 3 (88 Views)

vl-remove question

88 Views, 2 Replies
02-01-2008 11:07 AM
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
*Expert Elite*
_gile
Posts: 2,085
Registered: ‎04-29-2006
Message 2 of 3 (88 Views)

Re: vl-remove question

02-01-2008 12:06 PM in reply to: kdoug
Hi,

You can use vl-remove-if function

(vl-remove-if '(lambda (x) (= (caddr x) "C")) lst)
Gilles Chanteau
Distinguished Contributor
kdoug
Posts: 175
Registered: ‎06-15-2005
Message 3 of 3 (88 Views)

Re: vl-remove question

02-01-2008 12:41 PM in reply to: kdoug
Thanks gile! Works great.

Kdoug
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.