About Application-Specific Data (DCL)

The client_data_tile function assigns application-specific data to a tile.

Note: DCL support in AutoLISP is limited to Windows only.

The application-specific data for a tile is available at callback time as the $data variable and returned as a string. Client data is not represented in a DCL file and is valid only while your application is running. Using client data is comparable to using user-defined attributes. The main difference is that user-defined attributes are read-only, while client data can change at runtime. Also, end-users can inspect user-defined attributes in the application's DCL file, but client data is invisible to them.

Because your program must maintain the list displayed by a list box (or pop-up list), client data is good for handling this information. The following modification to the MK_LIST function makes the list an argument:

(defun MK_LIST (readlist displist / )

This code eliminates the need for a global list variable. The following calls in the main part of the dialog box handler associate a short list with the tile by calling client_data_tile, and then pass that list to MK_LIST by means of an action expression as follows:

(client_data_tile
  "colorsyslist"
  "Red-Green-Blue Cyan-Magenta-Yellow Hue-Saturation-Value"
)
(action_tile
  "colorsyslist"
  "(setq usrchoice (mk_list $value $data))"
)