Returns the second element of a list
(cadr list)
In AutoLISP, cadr is frequently used to obtain the Y coordinate of a 2D or 3D point (the second element of a list of two or three reals).
The second element in list; otherwise nil, if the list is empty or contains only one element.
Command: (setq pt2 '(5.25 1.0))
(5.25 1.0)
Command: (cadr pt2)
1.0
Command: (cadr '(4.0))
nil
Command: (cadr '(5.25 1.0 3.0))
1.0
See Also
-
The
Point Lists topic in the AutoLISP Developer's Guide.