C:XXX Functions

If an AutoLISP function is defined with a name of the form C:xxx, it can be issued at the AutoCAD Command prompt in the same manner as a built-in AutoCAD command. This is true regardless of whether you define and load the function in VLISP or at the AutoCAD Command prompt. You can use this feature to add new commands to AutoCAD or to redefine existing commands.

To use functions as AutoCAD commands, be sure they adhere to the following rules:

A function defined in this manner can be issued transparently from within any prompt of any built-in AutoCAD command, provided the function issued transparently does not call the command function. (This is the AutoLISP function you use to issue AutoCAD commands; see the entry on command in the AutoLISP Reference.) When issuing a C:XXX defined command transparently, you must precede the XXX portion with a single quotation mark (').

You can issue a built-in command transparently while a C:XXX command is active by preceding it with a single quotation mark ('), as you would with all commands that are issued transparently. However, you cannot issue a C:XXXcommand transparently while a C:XXX command is active.

NoteWhen calling a function defined as a command from the code of another AutoLISP function, you must use the whole name, including the parentheses; for example, (C:HELLO). You also must use the whole name and the parentheses when you invoke the function from the VLISP Console prompt.