Function Entry: GETCNAME
← Prev | ↑ Chapter | Next → | Index | Symbols
Function Entry: GETCNAME
Name
getcname
Class
Function
Syntax
(getcname cname)
Arguments and Values
cname: string; a localized command name, or an underscored English command name. Up to 64 characters.
Description
Converts between localized and English command names. Without an underscore, returns the underscored English command name. With an underscore, returns the localized command name. Useful for writing language-agnostic AutoLISP routines.
Return Values
A string, or nil if cname is invalid.
Side Effects
None.
Examples
In French AutoCAD:
(getcname "ETIRER")returns `"STRETCH"`.- `(getcname "STRETCH")
returns"ETIRER"`.
Availability
- AutoCAD 2026: documented.
- BricsCAD V25: measured (2026-10-26), with the differences noted below.
- Status: AutoCAD documented and measured; BricsCAD measured.
Source Notes
- [getcname (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-1DCDFFA6-0372-479D-B00F-D165EC5B8A2C.htm)
- Status: documented (Phase 3 body fill).
Measured: what getcname answers
Measured 2026-10-26 on French installs by the getcname probe (AutoCAD 2022 GUI job 17460836644 and AcCoreConsole 17460836645, BricsCAD V25 Windows 17460836643):
| input | AutoCAD 2022 | BricsCAD V25 |
|---|---|---|
| "LINE", "line" | "LIGNE" | "LIGNE" |
| "LIGNE", "ligne" | "LINE" | "LINE" |
| "LINE", "LIGNE" | nil | nil |
| "ZOOM" / "ZOOM" | "ZOOM" / "ZOOM" | "ZOOM" / "ZOOM" |
| "-LAYER" / "-CALQUE" | "-CALQUE" / "-LAYER" | the same |
| "-LAYER", "-LAYER" | nil | nil |
| ".LINE" / ".LIGNE" | "LIGNE" / "LINE" | nil |
| "'ZOOM", "'ZOOM" / "_'ZOOM" | "ZOOM" / "ZOOM" | nil |
| "ÉTIRER" (the name: ETIRER) | "STRETCH" | nil |
| a C: command, "", "_" | nil | nil |
| 1, nil | bad argument type | bad argument type |
A leading _ asks for the local name of an international one; anything
else is taken as a local name. The answer is upper case. The - of a
command-line command is part of its name. AutoCAD also strips the . and
' prefixes and ignores accents. Each product knows its own commands: a
French AutoCAD answers nil for _RECTANG, _MTEXT, _PROPERTIES, BricsCAD
for _BLEND, _XBIND; AcCoreConsole knows fewer than the AutoCAD GUI
(_3DORBIT).
clautolisp: getcname
getcname answers from the measured tables (cador/data/getcname/, one
per locale, per product), with the rules above: the BricsCAD dialects as
BricsCAD, the others as AutoCAD. The language is the session's (LANG):
under one with no table (English), a command of the product's table is its
own local name ("_LINE" -> "LINE", "LINE" -> "_LINE").