現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
Can I nest the function pptpop() in appdesigner and compile it?
1 回表示 (過去 30 日間)
古いコメントを表示
farzad
2020 年 5 月 9 日
Hi All
I want my compiled app, write outputs , images to powerpoint, and I used the pptpop function in my app that I am gonna compile, but it gives :
Error: Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer.
19 件のコメント
farzad
2020 年 5 月 9 日
farzad
2020 年 5 月 9 日
If I change it to
img = plot('plot1');
I get
Error: Invalid first data argument.
farzad
2020 年 5 月 9 日
should I do something like this , to add the population slide.mlx file path to my code ?
properties (Access = private)
oldpath = addpath('./icons')
end
Ameer Hamza
2020 年 5 月 9 日
Which line gives this error?
Error: Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer.
farzad
2020 年 5 月 9 日
I attached you the mfile. do you have this file in your matlab documentation directory. you can find printPlot in it. I don't know how it works. if you run pptpop() in workspace, it works. but if you run the printPlot alone, matlab does not know it
Ameer Hamza
2020 年 5 月 9 日
I don't have this file installed with my MATLAB. But if I run your file. It works without error.
farzad
2020 年 5 月 9 日
編集済み: farzad
2020 年 5 月 9 日
Yes, but did you nest the function into an app and run it ?
and what do you mean by working ? does it create the powerpoint file ? Because if it runs it means you don't need MATLAB report generator to create that. you should also have this file I belive. cause it calls an .mlx file that if it did not exist in your documentation directory, it would have buged with error
Ameer Hamza
2020 年 5 月 9 日
Yes, I can run this in the app, and it generates a PowerPoint file (attached). However, It needs to open separate figures to run the function. It does not draw the graphs on the uifigure of the app designer.
farzad
2020 年 5 月 9 日
I don't want it draw the graphs on th uifigure, I just wanted the powerpoint file be created. so : how come it's working from the app for you and not for mine ? how do you do that ?
Ameer Hamza
2020 年 5 月 9 日
I just put the line
pptpop()
in the startupFcn of the uifigure. Whenever I open the app, it runs the function and creates a ppt file in the same folder.
Note: I am using R2020a on macOS and haven't compiled the app.
farzad
2020 年 5 月 10 日
I don't think that this is a version issue. I hope not, so you get the completed powerpoint file, not just the file. I mean, the images are printed inside the ppt file ?
It will be very disappointing why on mine it's not working
farzad
2020 年 5 月 10 日
so why is it giving me this error. I think it'salso irrelevant to matlab report generator toolbox
farzad
2020 年 5 月 10 日
I moved the pptpop to a new button, this time the figure pops up and the empty powerpoint is created but still I havethe error
Error using print (line 80)
Functionality not supported with figures created with the uifigure function. For more information, see Graphics Support in App Designer.
Error in pptpop>printPlot (line 183)
print(imgtype, imgname);
Error in pptpop (line 67)
img = printPlot('plot1');
Ameer Hamza
2020 年 5 月 10 日
farzad, See the attached file. If these seem like the PowerPoint file, you want?
採用された回答
Walter Roberson
2020 年 5 月 10 日
R2020a and later:
change line 183,
print(imgtype, imgname);
to
exportgraphics(gcf, imgname)
7 件のコメント
Walter Roberson
2020 年 5 月 10 日
I believe it will work after compiling.
Leave line 67 as-is. You are modifying what printPlot() does.
exportgraphics is a replacement for print() and saveas()
Walter Roberson
2020 年 5 月 10 日
No, in R2019b there is no known way to get a copy of uifigure() as an image -- other than possibly invoking a system-level screen capture function some-how, such as an ActiveX control.
farzad
2020 年 5 月 11 日
Dear Walter, this question of mine is suffering from lack of views, I got a problem :
Walter Roberson
2020 年 5 月 12 日
I do not have Report Generator; also I am executing on Mac, which cannot talk to PowerPoint .
farzad
2020 年 5 月 12 日
The Mac news are very sad. at least I had put the .m file script so someone could have tried that on their PC
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Report Generator についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)