Well, here's mine:
;convert a flat list of coordinates as returned by ActiveX properties
; of objects like LWPlines, 3dplines, etc.
; arguments are the coordinate list and 2 or 3 for a 2d or 3d list
(defun list2coordpairs (clist 2or3 / newlist)
(if (= 2or3 2)
(while clist
(setq newlist (cons (list (car clist)
(cadr clist))
newlist)
clist (cddr clist))
)
(while clist
(setq newlist (cons (list (car clist)
(cadr clist)
(caddr clist))
newlist)
clist (cdddr clist))
)
)
(reverse newlist)
)
and in use:
_$ (setq mylist '(1.0 2.0 0.0 1.0 3.0 0.0 15.0 18.0 0.0 18.0 6.0 0.0))
(list2coordpairs mylist 2)
(list2coordpairs mylist 3)
(1.0 2.0 0.0 1.0 3.0 0.0 15.0 18.0 0.0 18.0 6.0 0.0)
((1.0 2.0) (0.0 1.0) (3.0 0.0) (15.0 18.0) (0.0 18.0) (6.0 0.0))
((1.0 2.0 0.0) (1.0 3.0 0.0) (15.0 18.0 0.0) (18.0 6.0 0.0))
_$