0

I'm trying to use Help Files to add contextual help in MsgBox (from Catia).

The idea is that the MsgBox is too small, and too limited (no pictures, no links...) to clearly display help.

So I'm calling MsgBox like this:

iType = iType + vbMsgBoxHelpButton
MsgBox(sMessage, iType, sType, sHelpF, CStr(iContext))

With this the "help" button is correctly added, and if i run this from Catia Debugger, I get the correct result, ie my help file is opening, at the page iContext. The help file I use is a CHM, generated with HelpNDoc.

But if I run this from a CATScript (what i need to do in the end), the button "help" is displayed, but when clicking on it, the Help file is not opened, and instead i got this error: Error message

For many reasons, i can't use .catvba or .bas files (it's working for this, but i still can't for other reasons), I must work with CATScripts

Any suggestions? I've been trying different settings on the CHM generation, but I always get the same result. And the MSDN documentation on the use of Help files is really scarce, so is the comments on this issue over the web.

Thanks in advance!

jonjbar
  • 3,896
  • 1
  • 25
  • 46
Rafiki
  • 604
  • 6
  • 19

1 Answers1

0

Instead of a MsgBox, you can generate a hta file with a link to what you need.

ferdo
  • 178
  • 4
  • Kind of what I'm doing. but what I want is to have the help button calling the help file. with an external HTA, I have to use lots of tricks to pass values from the HTA to the original script, and so far I avoid to do it due to Catia poor handling of it. And it's an overkill when I want a the user to answer a yes/no question (but the question could need some help to be answered) – Rafiki Mar 14 '16 at 12:43
  • Rafiki, CATScripts are not suitable for what you need, still, where are you now (I recognized the user), you can use vba in Excel, getting CATIA object... – ferdo Mar 14 '16 at 20:17
  • Well, CATScript should be able to do so, because this is implemented in the language (you can make the "help" button appear), but apparently poorly (it only has an effect to click on it when the MsgBox is opened from the VB debugger, but not from the CATScript run by Catia). I have a solution, which looks like what you suggested, but it's heavy to maintain, and I wanted to know if I could find a correction to this bug... apparently not! – Rafiki Mar 15 '16 at 13:54