Query and Command Functions Reference (AutoLISP)

 
 
 

The following table provides summary descriptions of the AutoLISP query and command functions.

Query and command functions

Function

Description

(acad_colordlg colornum [flag])

Displays the standard AutoCAD Color Selection dialog box

(acad_helpdlg helpfile topic)

Invokes the Help facility (obsolete)

(command [arguments] ...)

Executes an AutoCAD command

(command-s [arguments] ...)

Executes an AutoCAD command and the supplied input

(getcfg cfgname)

Retrieves application data from the AppData section of the acadXXXX.cfg file

(getcname cname)

Retrieves the localized or English name of an AutoCAD command

(getenv "variable-name")

Returns the string value assigned to an environment variable

(getvar "varname")

Retrieves the value of an AutoCAD system variable

(help [helpfile [topic [command]]])

Invokes the Help facility

(setcfg cfgname cfgval)

Writes application data to the AppData section of the acadXXXX.cfg file

(setenv "varname" "value")

Sets an environment variable to a specified value

(setfunhelp "c:fname" ["helpfile" ["topic" ["command"]]])

Registers a user-defined command with the Help facility so the appropriate help file and topic are called when the user requests help on that command

(setvar "varname" value)

Sets an AutoCAD system variable to a specified value

(ver)

Returns a string that contains the current AutoLISP version number

(vl-cmdf [arguments] ...)

Executes an AutoCAD command after evaluating arguments

(vlax-add-cmd global-name func-sym [local-name cmd-flags])

Adds commands to a group

NoteExtended AutoLISP extension: requires vl-load-com

(vlax-remove-cmd global-name)

Removes a single command or command group

NoteExtended AutoLISP extension: requires vl-load-com