Ok, This works on my system, but that doesnt guarantee it will for everyone.
First off I set up a reactor code that when a command is started, it stores the command name in a global variable. Then I set up a program that uses that variable to launch chm help to the command that is currently running. I also set up command ended and command cancelled reactors to reset the help variable to nil so that if no command is active, help defaults to the base page.
the CHM has to be located locally for this to work.
Reactor programs:
Code:
(if (not Command_Ending_Reactor)
(setq Command_Ending_Reactor
(vlr-command-reactor
nil
'((:vlr-commandended
.
Command_Ended_Command
)
)
) ;_ end of vlr-command-reactor
) ;_ end of setq
() ;_ the reactor is already loaded
) ;_ end of if
(if (not Command_Starting_Reactor)
(setq Command_Starting_Reactor
(vlr-command-reactor
nil
'((:vlr-commandwillstart
.
Command_Started_Command
)
)
) ;_ end of vlr-command-reactor
) ;_ end of setq
() ;_ the reactor is already loaded
) ;_ end of if
(if (not Command_Cancelling_Reactor)
(setq Command_Cancelling_Reactor
(vlr-command-reactor
nil
'((:vlr-commandcancelled
.
Command_Cancelled_Command
)
)
) ;_ end of vlr-command-reactor
) ;_ end of setq
() ;_ the reactor is already loaded
) ;_ end of if
Callback Functions:
Code:
(defun Command_Ended_Command (In_ReactorName In_Command / )
(setq helpcommand nil)
) ;_ end of defun
(defun Command_Started_Command (In_ReactorName In_Command / )
(setq helpcommand (car In_Command))
) ;_ end of defun
(defun Command_Cancelled_Command (In_ReactorName In_Command / )
(setq helpcommand nil)
) ;_ end of defun
Launch Help Command:
Code:
(defun c:LaunchacadHelp (/ c1)
(if (= Helpcommand nil)
(setq c1 "")
(setq c1 Helpcommand)
) ;_ end of if
(help "C:\\AUTODESK\\HELP\\ACAD181.chm" c1); change path to location of actual chm file
) ;_ end of defun
After these programs are loaded, one must create a custom command in their cui. I called mine CHM Help, and the macro is '_launchacadhelp
Then I redefined the F1 keyboard shortcut to run CHM Help.
Now, when I press F1, the chm help shows up. and for many commands, if I am in the command, the chm will jump right to the page I am working on. I'm still working on improving it so it works like the chm in 2010, if anyone else has any ideas on how to do so, I'm open to it.