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
(setfunhelp c:fname [helpfile [topic [command]]])
Arguments
C:XXX function). You must include the c: prefix.
A string specifying the user-defined command (theA string naming the Help file. The file extension is not required with the helpfile argument. If a file extension is provided, AutoCAD looks only for a file with the exact name specified.
If no file extension is provided, AutoCAD looks for helpfile with an extension of .chm. If no file of that name is found, AutoCAD looks for a file with an extension of .hlp.
A string identifying a Help topic ID. If you are calling a topic within a CHM file, provide the file name without the extension; AutoCAD adds an .htm extension.
A string that specifies the initial state of the Help window. The command argument is a string used by the uCommand (in HTML Help) or the fuCommand (in WinHelp) argument of the HtmlHelp() and WinHelp() functions as defined in the Microsoft Windows SDK.
For HTML Help files, the command parameter can be HH_ALINK_LOOKUP or HH_DISPLAY_TOPIC. For Windows Help files, the command parameter can be HELP_CONTENTS, HELP_HELPONHELP, or HELP_PARTIALKEY.
Return Values
nil.
The string passed as c:fname, if successful; otherwise,c: prefix. It does not verify that the c:fname function exists, nor does it verify the correctness of the other arguments supplied.
This function verifies only that the c:fname argument has theExamples
setfunhelp by defining a simple function and issuing setfunhelp to associate the function with the circle topic in the AutoCAD Help file (acad.chm):
The following example illustrates the use of(defun c:foo ()
(getstring "Press F1 for help on the foo command:")
)
(setfunhelp "c:foo" "acad.chm" "circle")
foo command and then pressing F1 displays the circle topic.
After this code is loaded, issuing theThis example works, but serves no real purpose. In the real world, you would create your own Help file and associate that Help file and topic with your function.
test:
Define a function namedCommand: (defun c:test()(getstring "\nTEST: " )(princ))
C:TEST
Associate the function with a call to Help with the string “line”:
Command: (setfunhelp "c:test" "acad.chm" "line")
"c:test"
test command and at the prompt, press F1; you should see the Help topic for the AutoCAD LINE command.
Run the