Open a cutsom chm file ribbon button

Open a cutsom chm file ribbon button

Anonymous
Not applicable
676 Views
5 Replies
Message 1 of 6

Open a cutsom chm file ribbon button

Anonymous
Not applicable

I am new to the Revit API. I have gone through the first tutorials and created a button in the revit ribbon that opens the "helloworld" task dialogue. I have created a custom chm help file and would like the button to open this file instead but cannot find the code. Can anyone help?

 

Thanks. Warren 

0 Likes
Accepted solutions (1)
677 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Try System.Diagnostics.Process.Start(filename)

0 Likes
Message 3 of 6

Anonymous
Not applicable

Hi Warren,

 

You need to use ContextualHelp class to associate custom help.

 

ContextualHelp

contextHelp = newContextualHelp(ContextualHelpType.ChmFile, @"C:\Demo.chm");

pushButtonHello.SetContextualHelp(contextHelp);

 

I have posted the relevant code snippet in our AEC DevBlog -

 

http://adndevblog.typepad.com/aec/2014/03/opening-a-custom-chm-file-from-ribbon-button-in-revit.html

 

Thanks,

0 Likes
Message 4 of 6

Anonymous
Not applicable
Accepted solution

Thanks, exactly what I was looking for

0 Likes
Message 5 of 6

Anonymous
Not applicable

Not exactly what I was after as far as I can see. I just wanted to open the chm file by pressing the button. Thanks anyway

0 Likes
Message 6 of 6

Anonymous
Not applicable
yes i also looking that
0 Likes