フィルターのクリア

Opening an external file in a deployed application

8 ビュー (過去 30 日間)
James Kerns
James Kerns 2013 年 1 月 29 日
コメント済み: Titus Edelhofer 2018 年 11 月 15 日
Hello, I'm trying to figure out how I might include a help file with my packaged GUI program. I'd like to have a help button that when clicked opens a PDF that I've written. It's easy enough to use winopen when using matlab, but how do I make it do this with a deployed application?
I've tried including the PDF in with the other secondary files at the time of packaging but that doesn't work. It would appear the winopen function will use the current directory and not its internal directory or whatever it does when calling included .m files.

採用された回答

Titus Edelhofer
Titus Edelhofer 2013 年 1 月 30 日
Hi James,
you can use the function
ctfroot
zu build up an absolute path to where your .pdf is when packed into the application. Or, if the .pdf is in the same folder as the function calling it, you might do something like the following
folder = fileparts(mfilename('fullpath'));
winopen(fullfile(folder, 'mydoc.pdf'));
Titus
  3 件のコメント
sandeep singh
sandeep singh 2018 年 10 月 29 日
Hello James, Even I am facing the issues with same. Even open function is not opening pdf after deployment, can u please help me
Titus Edelhofer
Titus Edelhofer 2018 年 11 月 15 日
The difference is: "open" is doing what MATLAB would do if you double click on it within MATLAB. winopen (if on Windows, of course!) does the action you would expect when double clicking within Windows explorer

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by