C:XXX feature, you can define a command that displays a simple message.Using the
_$â€ƒ(defun C:HELLO () (princ "Hello world. \n") (princ))
HELLO is now defined as a command, in addition to being an AutoLISP function. This means you can issue the command from the AutoCAD Command prompt.
command function itself. At the AutoCAD Command prompt, you could do the following:This new command can be issued transparently because it does not call the
Remember: to run this function from the VLISP Console window, you need to issue the function call with the parentheses because VLISP does not recognize AutoCAD commands.
setfunhelp function, you can associate a Help file and topic with a user-defined command. When help is requested during execution of the user-defined command, the topic specified by setfunhelp displays. See the AutoLISP Reference for more information on using setfunhelp.If you follow your function definition with a call to the
initget function, you can use arbitrary keyboard input with certain functions. This allows an AutoLISP-implemented command to accept an AutoLISP statement as a response. Also, the values returned by a DIESEL expression can perform some evaluation of the current drawing and return these values to AutoLISP. See for more information on using initget, and refer to the AutoCAD Customization Guide for information on the DIESEL string expression language.You cannot usually use an AutoLISP statement to respond to prompts from an AutoLISP-implemented command. However, if your AutoLISP routine makes use of the