Share

list (AutoLISP)

Product Documentation
Intermediate

Takes any number of expressions and combines them into one list

(list [expr...])

This function is frequently used to define a 2D or 3D point variable (a list of two or three reals).

Arguments

expr

An AutoLISP expression.

Return Values

A list, unless no expressions are supplied, in which case list returns nil.

Examples

(list 'a 'b 'c)
(A B C)

(list 'a '(b c) 'd)
(A (B C) D)

(list 3.9 6.7)
(3.9 6.7)

As an alternative to using the list function, you can explicitly quote a list with the quote function if there are no variables or undefined items in the list. The single quote character (') is defined as the quote function.

'(3.9 6.7) means the same as (list 3.9 6.7)

This can be useful for creating association lists and defining points.


Was this information helpful?