acad_colordlg
 
 
 

Displays the standard AutoCAD color selection dialog box

(acad_colordlg colornum [flag])

Arguments

colornum

An integer in the range 0-256 (inclusive), specifying the AutoCAD color number to display as the initial default.

flag

If set to nil, disables the ByLayer and ByBlock buttons. Omitting the flag argument or setting it to a non-nil value enables the ByLayer and ByBlock buttons.

A colornum value of 0 defaults to ByBlock, and a value of 256 defaults to ByLayer.

Return Values

The user-selected color number; otherwise nil, if the user cancels the dialog box.

Examples

Prompt the user to select a color, and default to green if none is selected:

(acad_colordlg 3)