Lisp of the Day

VL-SORT

(vl-sort list function)

The lisp function of the day is VL-SORT. I have used this in many ways in the past but my most recent application was to find a vertical line that was the furthest to the right based on a common start point where the “Y” value was “0”.

;Selecting filter
(ssget "_x" (list (cons -4 "*,=,*") (list 10 0 0 0)))
;Sorting
(vl-sort xlist '>)

The first element was the furthest line to the right.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: