Author Topic: Calling help functions from lisp  (Read 3104 times)

0 Members and 1 Guest are viewing this topic.

tbrock

  • Guest
Calling help functions from lisp
« on: February 03, 2010, 12:46:57 AM »
Bear with me, guys. First post here.
Anyone out there have any experience calling help files from within a lisp routine?
There seems to be a function "help" and another "setfunhelp", however
both seem to give only the help file without calling the specific topic i need.
I have tried with acad *.chm files and my own compiled help files with the same results.

Need to know the correct syntax and what form of the topic I should be using for that argument.

Thanks :-)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Calling help functions from lisp
« Reply #1 on: February 03, 2010, 12:55:24 AM »
try something like this perhaps
Code: [Select]

(defun c:foodle ()
    
  (getstring "Press F1 for help on the foodle command:")
    
)
(setfunhelp "c:foodle" "acad_acr.chm" "ARC")

« Last Edit: February 03, 2010, 01:01:02 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Calling help functions from lisp
« Reply #2 on: February 03, 2010, 08:42:44 AM »
Welcome to the Swamp tbrock. 8-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

tbrock

  • Guest
Re: Calling help functions from lisp
« Reply #3 on: February 03, 2010, 02:10:32 PM »
Thanks for the welcome CAB.
After poking around a little, I wish I had found this place some time ago.
Appreciate the effort, Kerry, but still in the same situation.
Best I can get is a help window open but not to any particular topic.
In fact it opens to "cannot display the webpage" until you choose a topic.
Any other suggestions out there?
Has anybody actually used compiled help files within an AutoCAD add-on?

Getting a little frustrated... seems like this should be simpler.

tbrock

  • Guest
Re: Calling help functions from lisp
« Reply #4 on: February 03, 2010, 02:13:38 PM »
Sorry I should have been a little more specific.. the end result is for a help file to be called from within dialog boxes during complex functions  where currently simple text files are used.

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Calling help functions from lisp
« Reply #5 on: February 03, 2010, 02:21:48 PM »
Sorry I should have been a little more specific.. the end result is for a help file to be called from within dialog boxes during complex functions  where currently simple text files are used.
I'm curious, why isn't a text file good enough?
TheSwamp.org  (serving the CAD community since 2003)

Mark

  • Custom Title
  • Seagull
  • Posts: 28762
Re: Calling help functions from lisp
« Reply #6 on: February 03, 2010, 02:23:32 PM »
TheSwamp.org  (serving the CAD community since 2003)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Calling help functions from lisp
« Reply #7 on: February 03, 2010, 02:25:59 PM »
Here is some more info:
http://www.theswamp.org/index.php?topic=20409.0


Shoot, you're too fast Mark. :-P
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Lee Mac

  • Seagull
  • Posts: 12926
  • London, England
Re: Calling help functions from lisp
« Reply #8 on: February 03, 2010, 02:26:59 PM »
I use a PDF help file in this:

http://www.theswamp.org/index.php?topic=31317.0

Not sure if that helps  :-)

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Calling help functions from lisp
« Reply #9 on: February 03, 2010, 02:33:02 PM »
Maybe that will help you.  Here is how I call it to show the ActiveX property of ' startpoint '.

Code: [Select]
(help (findfile "acadauto.chm") "idh_startpoint")
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

tbrock

  • Guest
Re: Calling help functions from lisp
« Reply #10 on: February 03, 2010, 03:14:05 PM »
I'm curious, why isn't a text file good enough?

They have been doing their jobs for a long time, just trying to bring a more polished look.
Need to incorporate some graphics at some point so I don't have to ramble forever to paint a picture of what the user should see.
Guess over all it's all in the "slick" factor.

Thanks for the link to that other thread, I think I may be moving in the right direction now.
Still having difficulty with the "topic" argument. I think I may have left out the html file that defines topic ID's in my .chm files

VovKa

  • Water Moccasin
  • Posts: 1632
  • Ukraine
Re: Calling help functions from lisp
« Reply #11 on: February 03, 2010, 05:53:24 PM »
tbrock, you can also open topics this way
Code: [Select]
(startapp "hh.exe" (strcat "ms-its:" (findfile "acadauto.chm") "::" "idh_startpoint.htm"))if you've forgot html file names you can always decompile you chm file
Code: [Select]
(startapp "hh.exe" (strcat "-decompile C:/Tmp " (findfile "acadauto.chm")))