add_list (AutoLISP/DCL)

Adds or modifies a string in the currently active dialog box list

Supported Platforms: Windows and Mac OS

Signature

(add_list str)
str

Type: String

Value to be assigned to the list.

Return Values

Type: String or nil

Returns the string added to the list, if successful; otherwise nil.

Remarks

Before using add_list, you must open the list and initialize it with a call to start_list. Depending on the operation specified in start_list, the string is either added to the current list or replaces the current list item.

Release Information

Examples

Assuming the currently active DCL file has a popup_list or list_box with a key of longlist, the following code fragment initializes the list and adds to it the text strings in llist.

(setq llist '("first line" "second line" "third line"))
(start_list "longlist")
(mapcar 'add_list llist) 
(end_list)

After the list has been defined, the following code fragment changes the text in the second line to "2nd line".

(start_list "longlist" 1 0)
(add_list "2nd line")
(end_list)