Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create Help Files

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
mracad
1762 Views, 5 Replies

Create Help Files

Just curious to find out what programs people use to create HELP files for custom LISP routines.
5 REPLIES 5
Message 2 of 6
scot-65
in reply to: mracad

I use an ALERT as part of the program if it has a dialog interface or it is not so simple a program.

The format I use is as follows:

"Routine Name" + "-help".

 

Be sure to place this alert section before the routine section so FAS files can display properly when loading.

 

File name: ABC.lsp

File contents:

 

(defun c:ABC-help ()

 (alert (strcat

 "..."

 "\n ..."

 "\n ..."

 ))

)

 

(defun c:ABC ()

 ...

)

 

I noticed w7 has a width limitation for the alert box (or maybe because it's R2014?).

 

Now one needs to hint to the users that there is a help facility available for the routine...

 

For more complicated or thorough explanation of a routine, I use simple HTML and create PDF's.


Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 3 of 6
paullimapa
in reply to: mracad

You can also do a customized window by writing your own DCL within the Lisp function:

 

; myhelp displays help info in custom dialog window
(princ"\nLoading...")(princ)
(defun c:myhelp ( / id shw_lst wrt_dcl)
 ; wrt_dcl function to create custom help dcl on the fly
 (defun wrt_dcl (/ fw)
  (setq fw (open (strcat (getenv"Temp")"\\MyHelpFile.dcl") "w")) ; write dcl to temp folder path
  (write-line"my_help : dialog { "fw)
  (write-line" label = \"\"; "fw)
  (write-line" key = \"my_help-title\"; "fw) ; custom help window title
  (write-line" : list_box { "fw)
  (write-line"   key = \"my_help-list-box\"; "fw) ; key to place help text
  (write-line"   tabs = \"5 10 15 20 25 30\"; "fw)
  (write-line"   width = 35; "fw) ; custom width size
  (write-line"   height = 7; "fw) ; custom height size
  (write-line" }"fw)
  (write-line" : ok_button { "fw)
  (write-line"   is_cancel = true; "fw)
  (write-line" }"fw)
  (write-line"}"fw)
  (setq fw (close fw))
 )
 ; shw_lst function to show custom help dcl window
 (defun shw_lst (ttl shwlst)
     (setq id (load_dialog (STRCAT(getenv"Temp")"\\MyHelpFile.dcl"))) ; load the dcl file from temp folder
     (new_dialog "my_help" id) ; call dcl name
     (set_tile "my_help-title" ttl) ; place custom title
     (start_list "my_help-list-box" 3) ; start list box
     (mapcar 'add_list shwlst) ; place help text info in list box
     (end_list)
     (start_dialog) ; start custom help window
     (unload_dialog id) ; unload dcl file
 )
 ; call wrt_dcl help function
 (wrt_dcl)
 ; call shw_lst help function
 (shw_lst
     "This is My Help Window Title"
     (list
       "This is first line of my help window."
       "\tThis is second line tabbed over."
       "This is third line back to normal."
       "\tFirst tab.\tSeconf Tab."
     )
 )
 ; delete help dcl file
 (vl-file-delete(STRCAT(getenv"Temp")"\\MyHelpFile.dc"))
) ; defun myhelp
(princ"\nMyHelp command ready.")(princ)


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 4 of 6
paullimapa
in reply to: mracad

Another method is to create Windows Help files:

1. HelpWorkshop.zip - which needs to be installed

2. RTF2HLP.zip - needs to be unzipped and run RTF2HLP.EXE - View README.TXT to see how to use this program...Create RTF files using program like Word and then use RTF2HLP to convert to Windows Help file.

3. Point to this URL http://support.microsoft.com/kb/917607 to install support on different Windows 7 and 8 computers for classic Windows Help format.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 6
mracad
in reply to: paullimapa

Thanks Pli, the RTF2HLP looks promising.
Message 6 of 6
bart_van_tuyl
in reply to: mracad

There are several options

 

1; add a help menu option to your existing lisp such as:

 

(defun YOUR_FUNCTION_SUBROUTINE()
(alert "This is where your original lisp would be placed")
)

(defun HELP_SUBROUTINE()
(help "C:/SOME DIRECTORY/SOME DIRECTORY/YOUR HELP FILE.CHM")
)

(defun C:TEST ()
(setq MYCHOICE (strcase (getstring "\nOptions [Your function/Help] <Your function>: ")))

(if (equal MYCHOICE "")(YOUR_FUNCTION_SUBROUTINE))

			(if (or (equal MYCHOICE "YOUR_FUNCTION"))(YOUR_FUNCTION_SUBROUTINE))
			(if (or (equal MYCHOICE "HELP"))(HELP_SUBROUTINE))
			)

 

As for the help file they can be composed ussing readily available CHM composers found online:

eg: http://www.helpndoc.com/download

 

the second option you might want to consider is to add automated help menues intergrated in your toolbars and ribbons this is done with xaml, see link: http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20Documentation/index.html?url=WS1a91938... 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost