Share
 
 

Query and Command Functions Reference (AutoLISP)

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

Query and command functions

Platforms

Windows

Mac OS

Web

Function

Description

AutoCAD AutoCAD LT AutoCAD AutoCAD LT AutoCAD

(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 (obsolete)

--

(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

-- / - supported, but doesn't do anything

(setcfg cfgname cfgval)

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

--

(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

-- / - supported, but doesn't do anything

(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

--

(vlax-remove-cmd global-name)

Removes a single command or command group

--

Was this information helpful?