Accessing Help Files

The help function provides access to both AutoCAD Help files (.ahp) and Windows Help files (.hlp). Depending on the Help file's extension, the help function calls the AutoCAD or the Windows Help viewer with the specified file. You can use this function to add a Help facility to your applications. The following code fragment calls the default AutoCAD Help file and provides information about the LINE command.

(help "" "line")

You can create a Help file that provides information about your applications or about procedures you use in your business. The following user-defined command displays the morehelp.hlp Help file as follows:

(defun C:MYHELP ( )
  (help "morehelp.hlp")

See the Customization Guide for information on creating and modifying help files.

The setfunhelp function provides help for user-defined commands. After the definition of your new command, adding a call to setfunhelp associates a specific help file and topic with that command. The following example assigns the help topic “Mycmd” in the file morehelp.hlp to the user-defined MYCMD command:

(defun C:MYCMD ( )
  . Command definition
(setfunhelp c:mycmd "morehelp.hlp" "mycmd")